【发布时间】:2021-02-17 22:24:15
【问题描述】:
我正在尝试使用 SessionCreateRQ 获取令牌,然后在 Sabre Production 中进行会话,但出现错误“无效或过期的二进制安全令牌”。
端点:https://webservices.havail.sabre.com/websvc 和 https://sws-crt.cert.havail.sabre.com
我有一个在 Prod 和 cert 中都可以使用但默认为 Prod 的 EPR。
请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:mes="http://www.ebxml.org/namespaces/messageHeader" xmlns:web="http://webservices.sabre.com">
<soapenv:Header>
<sec:Security>
<!--Optional:-->
<sec:UsernameToken>
<!--Optional:-->
<sec:Username>*****</sec:Username>
<!--Optional:-->
<sec:Password>*******</sec:Password>
<!--0 to 2 repetitions:-->
<sec:NewPassword>******</sec:NewPassword>
<!--Optional:-->
<Organization>IPCC</Organization>
<!--Optional:-->
<Domain></Domain>
</sec:UsernameToken>
<!--Optional:-->
<sec:SabreAth>?</sec:SabreAth>
<!--Optional:-->
<sec:BinarySecurityToken>?</sec:BinarySecurityToken>
</sec:Security>
<mes:MessageHeader mes:id="?" mes:version="?">
<mes:From>
<!--1 or more repetitions:-->
<mes:PartyId mes:type="?">?</mes:PartyId>
<!--Optional:-->
<mes:Role>?</mes:Role>
</mes:From>
<mes:To>
<!--1 or more repetitions:-->
<mes:PartyId mes:type="?">?</mes:PartyId>
<!--Optional:-->
<mes:Role>?</mes:Role>
</mes:To>
<mes:CPAId>?</mes:CPAId>
<mes:ConversationId>?</mes:ConversationId>
<mes:Service mes:type="?">TokenCreateRQ</mes:Service>
<mes:Action>TokenCreateRQ</mes:Action>
<mes:MessageData>
<mes:MessageId>?</mes:MessageId>
<mes:Timestamp>?</mes:Timestamp>
<!--Optional:-->
<mes:RefToMessageId>?</mes:RefToMessageId>
<!--Optional:-->
<mes:TimeToLive>?</mes:TimeToLive>
<!--Optional:-->
<mes:Timeout>3000</mes:Timeout>
</mes:MessageData>
<!--Optional:-->
<mes:DuplicateElimination>?</mes:DuplicateElimination>
<!--Zero or more repetitions:-->
<mes:Description xml:lang="?">?</mes:Description>
<!--You may enter ANY elements at this point-->
</mes:MessageHeader>
</soapenv:Header>
<soapenv:Body>
<web:TokenCreateRQ Version="?"/>
</soapenv:Body>
</soapenv:Envelope>
回应:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader eb:version="1.0" soap-env:mustUnderstand="1" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader">
<eb:From>
<eb:PartyId eb:type="?">?</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="?">?</eb:PartyId>
</eb:To>
<eb:CPAId>?</eb:CPAId>
<eb:ConversationId>?</eb:ConversationId>
<eb:Service eb:type="?">TokenCreateRQ</eb:Service>
<eb:Action>ErrorRS</eb:Action>
<eb:MessageData>
<eb:MessageId>1467037801397820233</eb:MessageId>
<eb:Timestamp>2021-02-17T22:15:39</eb:Timestamp>
<eb:RefToMessageId>?</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">?</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: ?</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>
请帮助我这里有什么问题?我知道我的 EPR 工作正常。
【问题讨论】:
-
澄清一下,您是否同时提交了 sec:UsernameToken 和 sec:BinarySecurityToken?你从哪里得到 sec:BinarySecurityToken?
标签: web-services soapui sabre