2

我正在尝试制作第一个简单的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>
4

6 回答 6

2

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

您的凭据可能被锁定(例如:由于连续尝试获取会话失败),因此您可以联系 webservices.support@sabre.com 以验证您的凭据状态。

确保在您的通信中提供用户名和 IPCC(组织)。

于 2015-12-10T18:53:48.540 回答
1

尝试使用“SessionCreate”作为服务名称而不是“SessionCreateRQ”

这是一个例子:

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Header>
        <MessageHeader xmlns="http://www.ebxml.org/namespaces/messageHeader">
            <From>
                <PartyId>WebServiceClient</PartyId>
            </From>
            <To>
                <PartyId>WebServiceSupplier</PartyId>
            </To>
            <CPAId>{ipcc}</CPAId>
            <ConversationId>657ADE1A-907C-49F9-9F87-94022CD9C51C</ConversationId>
            <Service>SessionCreate</Service>
            <Action>SessionCreateRQ</Action>
            <MessageData>
                <MessageId>9314594d-6c40-406b-9029-b887b13906b6</MessageId>
                <Timestamp>2015-07-07T16:57:06Z</Timestamp>
            </MessageData>
        </MessageHeader>
        <Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext">
            <UsernameToken>
                <Username>{usr}</Username>
                <Password>{pwd}</Password>
                <Organization xmlns="">{ipcc}</Organization>
                <Domain xmlns="">DEFAULT</Domain>
            </UsernameToken>
        </Security>
    </soap:Header>
    <soap:Body>
        <SessionCreateRQ xmlns="http://www.opentravel.org/OTA/2002/11">
            <POS>
                <Source PseudoCityCode="{ipcc}" />
            </POS>
        </SessionCreateRQ>
    </soap:Body>
</soap:Envelope>

我正在点击https://sws-crt.cert.sabre.com

于 2015-07-07T17:06:42.707 回答
0

如果您是 Sabre Travel Network 客户,请尝试 AA 域。

于 2015-07-07T14:44:48.223 回答
0

这是我使用的会话创建示例 xml。这很好用。

    <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:ns="http://www.opentravel.org/OTA/2002/11">
   <soapenv:Header>
      <sec:Security>
         <sec:UsernameToken>
            <sec:Username>Username</sec:Username>
            <sec:Password>Password Here</sec:Password>
            <Organization>xxxxx</Organization>
            <Domain>Default</Domain>
         </sec:UsernameToken>
         <sec:BinarySecurityToken></sec:BinarySecurityToken>
      </sec:Security>
      <mes:MessageHeader mes:id="" mes:version="">
         <mes:From>
            <mes:PartyId mes:type="urn:x12.org.IO5:01">com.abacus.SWSSession</mes:PartyId>
            <mes:Role></mes:Role>
         </mes:From>
         <mes:To>
            <mes:PartyId mes:type="urn:x12.org.IO5:01">webservices.sabre.com</mes:PartyId>
            <mes:Role></mes:Role>
         </mes:To>
         <mes:CPAId>xxxxx</mes:CPAId>
         <mes:ConversationId>0b0b90f0-5068-45a7-8786-83b592f5797e@com.abacus.SWSSession</mes:ConversationId>
         <mes:Service mes:type="Sabre xml">SessionCreateRQ</mes:Service>
         <mes:Action>SessionCreateRQ</mes:Action>
         <mes:MessageData>
            <mes:MessageId>68d2854c-bb8c-4fd1-8179-b60f03a487cd@com.abacus.SWSSession</mes:MessageId>
            <mes:Timestamp>2015-03-19T16:42:11</mes:Timestamp>
            <mes:TimeToLive>#3/20/2015 12:42:11 AM#</mes:TimeToLive>
            <mes:Timeout>30000</mes:Timeout>
         </mes:MessageData>
         <mes:DuplicateElimination></mes:DuplicateElimination>
         <mes:Description xml:lang=""></mes:Description>
      </mes:MessageHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ns:SessionCreateRQ returnContextID="">
         <ns:POS>
            <ns:Source PseudoCityCode="xxxxx"/>
         </ns:POS>
      </ns:SessionCreateRQ>
   </soapenv:Body>
</soapenv:Envelope>

xxxxx - 代表您的 IPCC 代码。

对于所有请求,我的派对 ID 保持不变。这在我的 cert 和 prod 端点上运行良好。

也有可能您的用户名和密码未被 sabre 授予访问权限,请与他们联系并验证登录是否处于活动状态。

于 2015-07-08T05:36:36.500 回答
0

在这里您可以看到一个非常简单的示例。

<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" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
    <SOAP-ENV:Header>
        <eb:MessageHeader SOAP-ENV:mustUnderstand="1" eb:version="1.0">
            <eb:From>
                <eb:PartyId type="urn:x12.org:IO5:01">999999</eb:PartyId>
            </eb:From>
            <eb:To>
                <eb:PartyId type="urn:x12.org:IO5:01">123123</eb:PartyId>
            </eb:To>
            <eb:CPAId>AM</eb:CPAId> <!-- Set the Airline code , two characters -->
            <eb:ConversationId>WaiversIT</eb:ConversationId>
            <eb:Service>SessionCreateRQ</eb:Service>
            <eb:Action>SessionCreateRQ</eb:Action>
            <eb:MessageData>
                <eb:MessageId>1000</eb:MessageId>               
            </eb:MessageData>
        </eb:MessageHeader>
        <wsse:Security>
            <wsse:UsernameToken>
                <wsse:Username>11111</wsse:Username>
                <wsse:Password>Password</wsse:Password>
                <Organization>AM</Organization><!-- Set the Airline code , two characters -->
                <Domain>AM</Domain><!-- Set the Airline code , two characters -->
            </wsse:UsernameToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <eb:Manifest SOAP-ENV:mustUnderstand="1" eb:version="1.0">
            <eb:Reference xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="cid:rootelement" xlink:type="simple"/>
        </eb:Manifest>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
于 2015-08-05T21:43:46.157 回答
0

SEI:https ://webservices.sabre.com

   <soapenv:Header>

      <sec:Security>
         <sec:UsernameToken>
            <sec:Username>${Properties#erp_username}</sec:Username>
            <sec:Password>${Properties#pass_code}</sec:Password>
            <sec:NewPassword>${Properties#pass_code}</sec:NewPassword>
            <Organization>${Properties#ipcc}</Organization>
            <Domain>${Properties#domain}</Domain>
         </sec:UsernameToken>
         <!--Optional:-->
         <sec:SabreAth />
         <sec:BinarySecurityToken />
      </sec:Security>

      <mes:MessageHeader mes:id="1" mes:version="2.0">
         <mes:From>
            <mes:PartyId mes:type="urn:x12.org:IO5:01">${Properties#from_patryid}</mes:PartyId>
            <mes:Role />
         </mes:From>
         <mes:To>
            <mes:PartyId mes:type="urn:x12.org:IO5:01">${Properties#to_patryid}</mes:PartyId>
            <mes:Role />
         </mes:To>
         <mes:CPAId>IPCC</mes:CPAId>
          <mes:ConversationId>${Properties#ConversationID}_${=System.currentTimeMillis()}</mes:ConversationId>
         <mes:Service mes:type="sabreXML">Session</mes:Service>
         <mes:Action>SessionCreateRQ</mes:Action>
         <mes:MessageData>
            <mes:MessageId>bilat_msg_id_${=System.currentTimeMillis()}</mes:MessageId>
            <mes:Timestamp>${=import java.text.SimpleDateFormat ; new SimpleDateFormat("YYYY-MM-dd'T'hh:mm:ss").format(new Date(System.currentTimeMillis() - 0 * 3600 * 1000))}Z</mes:Timestamp>
            <mes:RefToMessageId />
            <mes:TimeToLive>${=import java.text.SimpleDateFormat ; new SimpleDateFormat("YYYY-MM-dd'T'hh:mm:ss").format(new Date(System.currentTimeMillis() - 0 * 3600 * 1000))}Z</mes:TimeToLive>
            <mes:Timeout>100</mes:Timeout>
         </mes:MessageData>
         <!--Optional:-->
         <mes:DuplicateElimination />
      </mes:MessageHeader>
   </soapenv:Header>

   <soapenv:Body>
      <ns:SessionCreateRQ returnContextID="true">
         <ns:POS>
            <ns:Source PseudoCityCode="${Properties#ipcc}"/>
         </ns:POS>
      </ns:SessionCreateRQ>
   </soapenv:Body>

</soapenv:Envelope>
于 2015-09-26T02:57:56.483 回答