Loading ...
Sorry, an error occurred while loading the content.

Kind of new to SOAP having problems creating the following

Expand Messages
  • cynicalearth
    Message 1 of 1 , Jan 18, 2004
    • 0 Attachment
      <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:m0="http://m0:NAMESPACE">
      <SOAP-ENV:Header>
      <m:LoginHeader
      xmlns:m="m:NAMESPACE">
      <m0:username>USERNAME</m0:username>
      <m0:password>PASSWORD</m0:password>
      </m:LoginHeader>
      </SOAP-ENV:Header>
      <SOAP-ENV:Body>
      <m:SearchHotels
      xmlns:m="m:NAMESPACE">
      <m:sDestination>nyc</m:sDestination>
      <m:sHotelName></m:sHotelName>

      <m:dtCheckIn>2004-02-17T09:30:47-05:00</m:dtCheckIn>

      <m:dtCheckOut>2004-02-18T09:30:47-05:00</m:dtCheckOut>
      <m:roomsInformation>
      <m:RoomInfo>
      <m:AdultsNum>2</m:AdultsNum>
      <m:ChildNum>0</m:ChildNum>
      <m:ChildAges>

      <m:ChildAge>0</m:ChildAge>
      </m:ChildAges>
      </m:RoomInfo>
      </m:roomsInformation>
      <m:maxPrice>0</m:maxPrice>
      <m:starLevel>0</m:starLevel>
      </m:SearchHotels>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      I currently have this code -

      $soap = SOAP::Lite #the result varible will hold the return
      value of the function
      -> xmlschema('http://www.w3.org/2001/XMLSchema')
      -> uri($ns) #Map perl to .NET Namespace
      -> on_action(sub{sprintf '%s/%s', @_ }) #Fix SOAP::Lite
      SOAPAction headers to work with .NET
      -> proxy($proxy);#get the proxy stub

      $result = $soap->SearchHotels(
      SOAP::Header->name('SearchHotelsLoginHeader' =>
      \SOAP::Header->value(SOAP::Header->name('username' =>
      $username), SOAP::Header->name('password' => $password))),

      SOAP::Data->name('sDestination')->value($sDestination),
      SOAP::Data->name('sHotelName')->value(''),
      SOAP::Data->name('dtCheckIn')->type(dateTime)->value($dtCheckIn),
      SOAP::Data->name('dtCheckOut')->type(dateTime)->value($dtCheckOut),
      SOAP::Data->name('roomsInformation' =>
      \SOAP::Data->value(SOAP::Data->name('RoomInfo' =>
      \SOAP::Data->value(SOAP::Data->name('AdultsNum')-
      >value(2), SOAP::Data->name('ChildNum')->value(0), SOAP::Data->name
      ('ChildAges' =>
      \SOAP::Data->value(SOAP::Data->name
      ('ChildAge')->value(0))))))),

      SOAP::Data->name('maxPrice')->type(decimal)->value(0),
      SOAP::Data->name('starLevel')->type(decimal)->value(0) );

      Can anyone help?
    Your message has been successfully submitted and would be delivered to recipients shortly.