我正在使用在线旅行联盟模式向php soap客户端请求一些数据,
根据文件,我传递了以下参数
['OTA_HotelAvailRQ'] = data()
['OTA_HotelAvailRQ'] ['xmlns'] = http://www.opentravel.org/OTA/2003/05
['OTA_HotelAvailRQ'] ['AvailRatesOnly'] = true
['OTA_HotelAvailRQ'] ['EchoToken'] =单身
['OTA_HotelAvailRQ'] ['ExactMatchOnly'] = true
['OTA_HotelAvailRQ'] ['PrimaryLangID'] = ENbr>
['OTA_HotelAvailRQ'] ['RateDetailsInd'] = true
['OTA_HotelAvailRQ'] ['RateRangeOnly'] = true
['OTA_HotelAvailRQ'] ['RequestedCurrency'] = GBP
['OTA_HotelAvailRQ'] ['SummaryOnly'] = OnRequestInd
['OTA_HotelAvailRQ'] ['版本'] = 6.000
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] = data()
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] = data()
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['InfoSource'] =分布
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] = data()
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['AvailableOnlyIndicator'] = true
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] = data()
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['ExactMatch ='] = true
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['HotelRef'] = data()
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['HotelRef'] ['ChainCode'] = IW
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['HotelRef'] ['HotelCityCode'] = PAR
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['HotelRef'] ['HotelCode'] = IWPAR819
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['StayDateRange'] = data()
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['StayDateRange'] ['Start'] = 23-11-2013
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['StayDateRange'] ['End'] = 24-11-2013
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['RoomStayCandidates'] = data()
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['RoomStayCandidates'] ['RoomStayCandidate'] = data()
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['RoomStayCandidates'] ['RoomStayCandidate'] ['数量'] = 1
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['RoomStayCandidates'] ['RoomStayCandidate'] ['GuestCounts'] = data()
['OTA_HotelAvailRQ'] ['AvailRequestSegments'] ['AvailRequestSegment'] ['HotelSearchCriteria'] ['Criterion'] ['RoomStayCandidates'] ['RoomStayCandidate'] ['GuestCounts'] ['GuestCount'] = data()<登记/>
[ 'OTA_HotelAvailRQ'] [ 'AvailRequestSegments'] [ 'AvailRequestSegment'] [ 'HotelSearchCriteria'] [ '标准'] [ 'RoomStayCandidates'] [ 'RoomStayCandidate'] [ 'GuestCounts'] [ 'GuestCount'] [ 'AgeQualifyingCode'] = 10
[ 'OTA_HotelAvailRQ'] [ 'AvailRequestSegments'] [ 'AvailRequestSegment'] [ 'HotelSearchCriteria'] [ '标准'] [ 'RoomStayCandidates'] [ 'RoomStayCandidate'] [ 'GuestCounts'] [ 'GuestCount'] [ '计数'] = 1
当soap客户端使用提供的WSDL生成xml时,它会生成
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:ns2="http://xml.amadeus.com/ws/2009/01/WBS_Session-2.0.xsd"><SOAP-ENV:Header><ns2:Session><ns2:SessionId>xxxxxxx</ns2:SessionId><ns2:SequenceNumber>3</ns2:SequenceNumber><ns2:SecurityToken>xxxxxxxxxxxxxxx</ns2:SecurityToken></ns2:Session></SOAP-ENV:Header><SOAP-ENV:Body><ns1:OTA_HotelAvailRQ SummaryOnly="true" AvailRatesOnly="true" RateRangeOnly="true" ExactMatchOnly="true" RequestedCurrency="GBP" RateDetailsInd="true" EchoToken="single" Version="6.000"><ns1:AvailRequestSegments><ns1:AvailRequestSegment InfoSource="Distribution"><ns1:HotelSearchCriteria AvailableOnlyIndicator="true"><ns1:Criterion/></ns1:HotelSearchCriteria></ns1:AvailRequestSegment></ns1:AvailRequestSegments></ns1:OTA_HotelAvailRQ></SOAP-ENV:Body></SOAP-ENV:Envelope>
它只是在AvailableOnlyIndicator之后不包含任何内容,而标准参数则未处理。 现在,这是一个简单的技术,肥皂客户端查看WSDL和XSD并相应地生成xml,但这里有些错误,不确定在哪里。