Sabre SOAP - OTA_VehAvailRateLLSRQ - CarAvaiability 2.4.2



我正在尝试调用此SABRE API进行测试。问题是,即使我从他们的网站上获得代币,它也会给我"无效代币"。看起来这是某种异常吞咽。

有人能帮忙吗?

网址:"https://webservices.havail.sabre.com/websvc

请求:

<?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>
<eb:MessageHeader SOAP-ENV:mustUnderstand="1" eb:version="1.0">
<eb:From>
<eb:PartyId />
</eb:From>
<eb:To>
<eb:PartyId />
</eb:To>
<eb:CPAId>DCG</eb:CPAId>
<eb:ConversationId>1234</eb:ConversationId>
<eb:Service>OTA_VehAvailRateLLSRQ</eb:Service>
<eb:Action>OTA_VehAvailRateLLSRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>mid:20001209-133003-2333@clientofsabre.com</eb:MessageId>
<eb:Timestamp>2001-02-15T11:15:12Z</eb:Timestamp>
<eb:TimeToLive>2001-02-15T11:15:12Z</eb:TimeToLive>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary"><TOKEN></wsse:BinarySecurityToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<eb:Manifest SOAP-ENV:mustUnderstand="1" eb:version="1.0">
<eb:Reference xlink:href="cid:rootelement" xlink:type="simple" />
</eb:Manifest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

响应:

<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader
xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="URI"/>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI"/>
</eb:To>
<eb:CPAId>DCG</eb:CPAId>
<eb:ConversationId>1234</eb:ConversationId>
<eb:Service>OTA_VehAvailRateLLSRQ</eb:Service>
<eb:Action>ErrorRS</eb:Action>
<eb:MessageData>
<eb:MessageId>1268526483006710967</eb:MessageId>
<eb:Timestamp>2020-04-20T13:25:00</eb:Timestamp>
<eb:RefToMessageId>mid:20001209-133003-2333@clientofsabre.com</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">T1RLAQLKsWdy2rgwff0GLkvtNyOA/+VwuhCcnUQkuIUsGd4M5EzMI4iNAADAIhXoZ1cmf0lgWDyy+xBWtgEO07wA+JcuqIqxP9p4K6ZvtDo8yc1UfsmFgCejOpb4m0kBI/VJbfz6TDf9yzgA0bFmcS/Hq9FWXRMEf2fq3AkRETyZpTQe+vFODBp5Qstn90ox5lSDs4wv8RoYKZdN9HRo982LLwCtcAwMx6EoBd3C7MlJlkjl/mpwCxC54+teR5bJVuk6AYVS/</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Client.InvalidSecurityToken</faultcode>
<faultstring>Invalid or Expired binary security token: T1RLAQLKsWdy2rgwff0GLkvtNyOA/+VwuhCcnUQkuIUsGd4M5EzMI4iNAADAIhXoZ1cmf0lgWDyy+xBWtgEO07wA+JcuqIqxP9p4K6ZvtDo8yc1UfsmFgCejOpb4m0kBI/VJbfz6TDf9yzgA0bFmcS/Hq9FWXRMEf2fq3AkRETyZpTQe+vFODBp5Qstn90ox5lSDs4wv8RoYKZdN9HRo982LLwCtcAwMx6EoBd3C7MlJlkjl/mpwCxC54+teR5bJVuk6AYVS/</faultstring>
<detail>
<StackTrace>com.sabre.universalservices.base.session.SessionException: errors.session.USG_INVALID_SECURITY_TOKEN</StackTrace>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>

我的印象是我做错了什么,我真的不知道发生了什么,也看不到太多关于它的文档。

谢谢。

首先,您应该研究Sabre的"如何"指南。https://developer.sabre.com/guides/travel-agency/how-to/get-token.

在SessionCreate调用之后会创建一个令牌。因此,您可以在SessionCreate响应下使用BinarySecurityToken值。

https://developer.sabre.com/docs/soap_apis/session_management/create_session

最新更新