SoapUI 第一个示例 - Saber

标签 soapui sabre

我正在尝试使第一个简单的soapUI项目能够请求有效的 session 。我指的是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} 这样的 token 被我们的凭据替换。

这些是我尝试过的端点: -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>

最佳答案

现在可能已经晚了,但以防万一 - 我尝试了与您完全相同的请求,并且它对我有用(使用我自己的凭据)。

您的凭据可能被锁定(例如:由于连续尝试获取 session 失败),因此您可以联系 [email protected]验证您的凭据状态。

请务必在通信中提供用户名和 IPCC(组织)。

关于SoapUI 第一个示例 - Saber,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31270965/

相关文章:

linux - 如何使用 sys 文件系统将 RTC 设置为唤醒源并在所有日期设置特定时间

magentosoapapiv2catalogProductInfo “Session expired. Try to relogin”错误

xpath - SoapUI和Excel:空值与无值

xml - 如何查找 Sabre Soap API 的特定端点?

.net - 在 Saber 网络服务中出现错误 FRMT.NOT ENT BGNG

sabre - 利用地理代码和半径搜索酒店空房情况

rest - SoapUI - 带有查询参数的 REST Mocking

jenkins - 每次在 CLI - SOAPUI 中运行测试运行程序脚本时,如何将报告保存到新位置

java - 无法使用 SOAP UI 访问通过受 Siteminder 保护的 Web 服务器发送的请求的 Web 服务

python - Sabre GetReservation wsdl 不包含 PriceQuoteServices 的架构