我想使用无会话令牌来搜索广告投放,我是通过TokenCreateRQ API创建的令牌,但是当搜索广告投放时,响应返回错误。 如何在Saber服务器的呼叫API中使用无会话令牌?
这是带有会话令牌的请求:
Array
(
[0] => 1
[1] => 5
[2] => 12
[3] => 11
[4] => 10
)
这是响应返回:
<?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:eb='http://www.ebxml.org/namespaces/messageHeader'
xmlns:xlink='http://www.w3.org/1999/xlink'
xmlns:xsd='http://www.w3.org/1999/XMLSchema'>
<SOAP-ENV:Header xmlns='http://webservices.sabre.com/sabreXML/2011/10'>
<eb:MessageHeader eb:version='1.0'
xmlns:eb='http://www.ebxml.org/namespaces/messageHeader'
xmlns='http://webservices.sabre.com/sabreXML/2011/10' SOAP-ENV:mustUnderstand='1'>
<eb:From>
<eb:PartyId eb:type='urn:x12.org:IO5:01'>webservices.sabre.com</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type='urn:x12.org:IO5:01'>20001od.arilines@info.com</eb:PartyId>
</eb:To>
<eb:CPAId>OD</eb:CPAId>
<eb:ConversationId>20001-OD-1</eb:ConversationId>
<eb:Service eb:type='sabreXML'>OTA_AirAvailLLSRQ</eb:Service>
<eb:Action>OTA_AirAvailLLSRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>477074285960250152</eb:MessageId>
<eb:Timestamp>2019-01-14T08:15:07</eb:Timestamp>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse='http://schemas.xmlsoap.org/ws/2002/12/secext'
xmlns:wsu='http://schemas.xmlsoap.org/ws/2002/12/utility'>
<wsse:BinarySecurityToken valueType='String' EncodingType='wsse:Base64Binary'>T1RLAQK/kiOCnpnAl9UVbA+ec/6W28TsohCsdMPUn8cmmeo2PsY8w8OEAACgmiUlMWHJafsc5R6u8wjlUqwk1VX/lmzTgqtr+DWSlwmEsomADWrnscwbk2QxUQDeN/2RqnG77DtzF4O6bZkY4HO990SyrO5SngyQEd0OQGDUTbfEL4SmsK0mKQCdemN5Gb4UWcA0cIYBKXIGsBuMLkJ3+REWUejyeBuCUiIvSljmjhLcJPWgJJlqRNv2Mqo+1q/KTpbstX48UJi71Kug7w**</wsse:BinarySecurityToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<OTA_AirAvailRQ xmlns='http://webservices.sabre.com/sabreXML/2011/10'
xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' ReturnHostCommand='false' Version='2.0.0'>
<OptionalQualifiers xmlns='http://webservices.sabre.com/sabreXML/2011/10'>
<FlightQualifiers>
<VendorPrefs>
<Airline Code='OD'/>
</VendorPrefs>
</FlightQualifiers>
</OptionalQualifiers>
<OriginDestinationInformation>
<FlightSegment DepartureDateTime='01-23'>
<DestinationLocation LocationCode='SIN'/>
<OriginLocation LocationCode='HAN'/>
</FlightSegment>
</OriginDestinationInformation>
</OTA_AirAvailRQ>
</SOAP-ENV:Body> </SOAP-ENV:Envelope>
请帮助!
答案 0 :(得分:2)
OTA_AirAvailLLSRQ不支持SessionLess令牌。此服务需要使用SessionCreate创建的会话令牌。
https://developer.sabre.com/docs/read/soap_apis/air/search/Air_Availability