我正在尝试制作第一个简单的soapUI 项目来请求有效的会话。我指的是https://developer.sabre.com/docs/read/soap_basics/getting_started Soap UI 示例。
我们有我们的用户名、密码、IPCC,然后我生成了一个 ConversationID,就像 pdf 中建议的那样。我将“默认”留给域。
无论我设置的端点是什么(开发、证书、产品),当我尝试第一个“RequestSessionsRQ”时,我总是得到错误的身份验证。
我可能遗漏了一些非常基本的内容,但我无法弄清楚,您有什么建议吗?
更新:
这是 SOAP 请求:
<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 type="urn:x12.org:IO5:01">WS_Client</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId type="urn:x12.org:IO5:01">WS_Provider</eb:PartyId>
</eb:To>
<eb:CPAId>${#Project#Organization}</eb:CPAId>
<eb:ConversationId>${#Project#ConversationID}_${=System.currentTimeMillis()} </eb:ConversationId>
<eb:Service eb:type="OTA">SessionCreateRQ</eb:Service>
<eb:Action>SessionCreateRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>Waynaut_id_${=System.currentTimeMillis()}</eb:MessageId>
<eb:Timestamp>${=import java.text.SimpleDateFormat ; new SimpleDateFormat("YYYY-MM-dd'T'hh:mm:ss").format(new Date(System.currentTimeMillis() - 0 * 3600 * 1000))}Z</eb:Timestamp>
<eb:TimeToLive>${=import java.text.SimpleDateFormat ; new SimpleDateFormat("YYYY-MM-dd'T'hh:mm:ss").format(new Date(System.currentTimeMillis() -6 * 3600 * 1000))}Z</eb:TimeToLive>
</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:UsernameToken>
<wsse:Username>${#Project#Username}</wsse:Username>
<wsse:Password>${#Project#Password}</wsse:Password>
<Organization>${#Project#Organization}</Organization>
<Domain>DEFAULT</Domain>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<SessionCreateRQ>
<POS>
<Source PseudoCityCode="${#Project#Organization}"/>
</POS>
</SessionCreateRQ>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
其中像 ${#Project#Organization} 这样的令牌被我们的凭据替换。
这些是我尝试过的端点: - https://sws3-sts.cert.sabre.com/ - https://sws3-crt.cert.sabre.com/ - https://webservices3.sabre.com /
我不知道“PartyId”应该是什么,并保留文档示例中给出的默认值。
这些是响应:
<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="URI">WS_Provider</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI">WS_Client</eb:PartyId>
</eb:To>
<eb:CPAId>P4FF</eb:CPAId>
<eb:ConversationId>TEST-CONVERSATION_1436438834114</eb:ConversationId>
<eb:Service eb:type="OTA">SessionCreateRQ</eb:Service>
<eb:Action>ErrorRS</eb:Action>
<eb:MessageData>
<eb:MessageId>472e975f-6a9b-4735-980e-c5ea4b4ae8e5@61</eb:MessageId>
<eb:Timestamp>2015-07-09T10:47:12</eb:Timestamp>
<eb:RefToMessageId>Waynaut_id_1436438834114</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"/>
</soap-env:Header>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Client.AuthenticationFailed</faultcode>
<faultstring>Authentication failed</faultstring>
<detail>
<StackTrace>com.sabre.universalservices.base.security.AuthenticationException: errors.authentication.USG_AUTHENTICATION_FAILED</StackTrace>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>