如何在php中调用expedia xml webservice

I try to call an expedia xml webservice in php, using curl. But how to send the XML data with post

sample request

<BookingConfirmRQ xmlns="http://www.expediaconnect.com/EQC/BC/2007/09">
    <Authentication username="mytestusername" password="mypwd"/>
    <Hotel id="7224658"/>    
    <BookingConfirmNumbers>
        <BookingConfirmNumber bookingID="252743459" bookingType="Book" confirmNumber="E2340589B" confirmTime="2013-12-30T23:45:00Z"/>
    </BookingConfirmNumbers>
</BookingConfirmRQ>

response

<BookingConfirmRS xmlns="http://www.expediaconnect.com/EQC/BC/2007/08">
    <Success/> OR FAIL
</BookingConfirmRS>

my code part

    $curl = curl_init();
    $url ="https://services.expediapartnercentral.com/eqc/bc";
    $data = array();//What will be data here and which formate

    switch ($method)
    {
        case "POST":
            curl_setopt($curl, CURLOPT_POST, 1);

            if ($data)
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
            break;
        case "PUT":
            curl_setopt($curl, CURLOPT_PUT, 1);
            break;
        default:
            if ($data)
                $url = sprintf("%s?%s", $url, http_build_query($data));
    }

    // Optional Authentication:
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "MYusername:MYpassword");

    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

    $result = curl_exec($curl);

I am confused about What will be POST DATA here and which format? Is it right approach to use CURL or I have to use SoapClient() here? Please share your idea and solution. thanks

your question is only. what is $data should be, isnt?

you must know this ordinary html form. in this case i use login form

<form method=POST> 
<input type=text name=user value=admin>
<input type=password name=pass value=SECRET>
<input type=submit name=login value=sigin>
</form>

we can use curl to doing that with your curl script. and $data will be:

$method='POST';
$data = array(
  'user'=> 'admin',
  'pass'=>'SECRET',
  'login'=>'sigin'
);