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

Please recommend a PHP SOAP class

Expand Messages
  • Agent_
    Hi, I am trying to create a SOAP request, where the wsdl file (http://www.travelnow.com/services/HotelInfo?wsdl) has a complexType, which I am not able to
    Message 1 of 1 , Jul 15, 2003
    • 0 Attachment
      Hi,

      I am trying to create a SOAP request, where the wsdl file
      (http://www.travelnow.com/services/HotelInfo?wsdl) has a
      complexType, which I am not able to include into the request:
      </complexType>
      <complexType name="HotelInfoRequest">
      <sequence>
      <element name="hotelId" type="xsd:long" />
      </sequence>
      </complexType>


      I need to generate this SOAP request:

      [
      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <nsl:request
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:nsl="http://www.travelnow.com/services/HotelInfo">
      <xmlRequest href="#id0"/>
      </nsl:request>
      <multRef id="id0" soapenc:root="0"
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xsi:type="ns2:XmlRequest"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:ns2="http://common.xml.travelnow.com">
      <cid xsi:type="xsd:long">1</cid>
      <currencyCode xsi:type="xsd:string" xsi:nil="true"/>
      <request href="#idl"/>
      <supplierType xsi:type="xsd:string" xsi:nil="true"/>
      </multiRef>
      <multiRef id="idl" soapenc:root="0"
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xsi:type="ns3:HotelInfoRequest"
      xmlns:ns3="http://info.hotel.xml.travelnow.com"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
      <hotelID xsi:type="xsd:long">105748</hotelId>
      </multiRef>
      </soapenv:Body>
      </soapenc:Envelope>
      ]

      I tried to use NuSOAP (PHP) class, failed and an expert advised me
      that "The last time I checked, NuSOAP did not correctly handle WSDL in
      which the <types> included multiple <schema>. It lumped all schema
      information under a single namespace."

      Could someone recommend me, which (PHP) SOAP class could handle
      generating such SOAP request?

      Thank you!

      Best regards,

      Art

      P.S.: I attach part of the API for the Web Service:
      API:

      Common Complex Types
      The following are common complex types, which are used in all of the
      hotel
      services.
      Type Name Description
      XmlRequest contains elements common to all requests
      XmlResponse contains elements common to all responses
      ErrorInfo part of the XmlResponse, which contains error
      information

      XmlRequest Details
      The XmlRequest contains elements that will potentially be used for
      all requests.

      Element Description
      cid (long) IAN issued cid
      currencyCode (string) currency code that the user wouldlike
      rates displayed in - optional, USD by default
      supplierType (string) desired supplier to be used for the
      request – optional
      request (any type) actual request object based on the
      type of request

      XmlResponse Details
      The XmlResponse contains elements that will potentially be used in
      all responses.
      Element Description
      supplierType (string) supplier who the response details
      came from
      response (any type) actual response object based on the
      type of request/response
      errorInfo (ErrorInfo) complex type containing error
      information

      Hotel Services and Details

      HotelInfo
      The HotelInfo service returns information on a specific hotel.

      WSDL: http://www.travelnow.com/services/HotelInfo?wsdl

      HotelInfoRequest Details
      The elements that go into a hotel information request.
      Element Description
      hotelId (long) id for the specific PROVIDER
    Your message has been successfully submitted and would be delivered to recipients shortly.