Sabre Soap 会话令牌在使用前过期

Sabre Soap Session Token Expiring Before Use

我使用 SessionCreateRQ 创建了会话令牌,我得到了令牌和对话 ID。每当我尝试 运行 具有相同详细信息的 BergainFinderMxRQ 时,我都会收到过期或无效令牌错误。

以下是请求和响应

SessionCreateRQ

<?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 xmlns="http://www.ebxml.org/namespaces/messageHeader">
         <eb:From>
            <eb:PartyId type="urn:x12.org:IO5:01">http://localhost:8000</eb:PartyId>
         </eb:From>
         <eb:To>
            <eb:PartyId type="urn:x12.org:IO5:01">https://webservices.havail.sabre.com</eb:PartyId>
         </eb:To>
         <eb:CPAId>****</eb:CPAId>
         <eb:ConversationId>V1@xvRh8eAWk1tS4aSk7EB9y0ylxZ7g3Mpttgv5h3NL@5a9664b7bdd73@http://localhost:8000</eb:ConversationId>
         <eb:Service eb:type="sting">Cruise</eb:Service>
         <eb:Action>SessionCreateRQ</eb:Action>
         <eb:MessageData>
            <MessageId>xvRh8eAWk1tS4aSk7EB9y0ylxZ7g3Mpttgv5h3NL@http://localhost:8000</MessageId>
            <Timestamp>2018-02-28T08:13:43+01:00</Timestamp>
            <TimeToLive>2018-02-28T09:13:43+01:00</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>****</wsse:Username>
            <wsse:Password>******</wsse:Password>
            <Organization>****/Organization>
            <Domain>DEFAULT</Domain>
         </wsse:UsernameToken>
      </wsse:Security>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <SessionCreateRQ xmlns="http://www.opentravel.org/OTA/2002/11">
         <POS>
            <Source PseudoCityCode="****" />
         </POS>
      </SessionCreateRQ>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

SessionCreateRS

<?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">https://webservices.havail.sabre.com</eb:PartyId>
         </eb:From>
         <eb:To>
            <eb:PartyId eb:type="URI">http://localhost:8000</eb:PartyId>
         </eb:To>
         <eb:CPAId>****</eb:CPAId>
         <eb:ConversationId>V1@xvRh8eAWk1tS4aSk7EB9y0ylxZ7g3Mpttgv5h3NL@5a9664b7bdd73@http://localhost:8000</eb:ConversationId>
         <eb:Service eb:type="sabreXML">Session</eb:Service>
         <eb:Action>SessionCreateRS</eb:Action>
         <eb:MessageData>
            <eb:MessageId>3230747296278060193</eb:MessageId>
            <eb:Timestamp>2018-02-28T08:13:48</eb:Timestamp>
            <eb:RefToMessageId>xvRh8eAWk1tS4aSk7EB9y0ylxZ7g3Mpttgv5h3NL@http://localhost:8000</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">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/RESD!ICESMSLB\/RES.LB!-3173602095678878075!1805403!0</wsse:BinarySecurityToken>
      </wsse:Security>
   </soap-env:Header>
   <soap-env:Body>
      <SessionCreateRS xmlns="http://www.opentravel.org/OTA/2002/11" version="1" status="Approved">
         <ConversationId>V1@xvRh8eAWk1tS4aSk7EB9y0ylxZ7g3Mpttgv5h3NL@5a9664b7bdd73@http://localhost:8000</ConversationId>
      </SessionCreateRS>
   </soap-env:Body>
</soap-env:Envelope>

然后我进入 BargainFinderMaxRQ

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Header>
      <m:MessageHeader xmlns:m="http://www.ebxml.org/namespaces/messageHeader">
         <m:From>
            <m:PartyId type="urn:x12.org:IO5:01">http://localhost:8000</m:PartyId>
         </m:From>
         <m:To>
            <m:PartyId type="urn:x12.org:IO5:01">https://webservices.havail.sabre.com</m:PartyId>
         </m:To>
         <m:CPAId>***</m:CPAId>
         <m:ConversationId>V1@xvRh8eAWk1tS4aSk7EB9y0ylxZ7g3Mpttgv5h3NL@5a9664b7bdd73@http://localhost:8000</m:ConversationId>
         <m:Service m:type="OTA">BargainFinderMaxRQ</m:Service>
         <m:Action>BargainFinderMaxRQ</m:Action>
         <m:MessageData>
            <m:MessageId>3230747296278060193</m:MessageId>
            <m:Timestamp>2018-02-28T08:15:25Z</m:Timestamp>
            <m:TimeToLive>2018-02-28T08:15:25Z</m:TimeToLive>
         </m:MessageData>
         <m:DuplicateElimination />
         <m:Description>BargainFinderMaxRQ</m:Description>
      </m:MessageHeader>
      <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
         <wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/RESD!ICESMSLB\/RES.LB!-3173602095678878075!1805403!0</wsse:BinarySecurityToken>
      </wsse:Security>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <OTA_AirLowFareSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" Target="Production" Version="3.3.0" ResponseType="OTA" ResponseVersion="3.3.0">
         <POS>
            <Source PseudoCityCode="****">
               <RequestorID ID="1" Type="1">
                  <CompanyName Code="TN" />
               </RequestorID>
            </Source>
         </POS>
         <OriginDestinationInformation RPH="1">
            <DepartureDateTime>2018-03-04T00:00:00</DepartureDateTime>
            <OriginLocation LocationCode="LHR" />
            <DestinationLocation LocationCode="DXB" />
            <TPA_Extensions>
               <SegmentType Code="O" />
            </TPA_Extensions>
         </OriginDestinationInformation>
         <OriginDestinationInformation RPH="2">
            <DepartureDateTime>2018-03-07T00:00:00</DepartureDateTime>
            <OriginLocation LocationCode="DXB" />
            <DestinationLocation LocationCode="LHR" />
            <TPA_Extensions>
               <SegmentType Code="O" />
            </TPA_Extensions>
         </OriginDestinationInformation>
         <TravelPreferences ValidInterlineTicket="true">
            <CabinPref PreferLevel="Preferred" Cabin="Y" />
            <TPA_Extensions>
               <TripType Value="Return" />
               <LongConnectTime Min="780" Max="1200" Enable="true" />
               <ExcludeCallDirectCarriers Enabled="true" />
            </TPA_Extensions>
         </TravelPreferences>
         <TravelerInfoSummary>
            <SeatsRequested>1</SeatsRequested>
            <AirTravelerAvail>
               <PassengerTypeQuantity Code="ADT" Quantity="1" />
            </AirTravelerAvail>
         </TravelerInfoSummary>
         <TPA_Extensions>
            <IntelliSellTransaction>
               <RequestType Name="100ITINS" />
            </IntelliSellTransaction>
         </TPA_Extensions>
      </OTA_AirLowFareSearchRQ>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

然后我从 BargainFinderMaxRS 收到了这个回复

<?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">https://webservices.havail.sabre.com</eb:PartyId>
         </eb:From>
         <eb:To>
            <eb:PartyId eb:type="URI">http://localhost:8000</eb:PartyId>
         </eb:To>
         <eb:CPAId>****</eb:CPAId>
         <eb:ConversationId>V1@xvRh8eAWk1tS4aSk7EB9y0ylxZ7g3Mpttgv5h3NL@5a9664b7bdd73@http://localhost:8000</eb:ConversationId>
         <eb:Service eb:type="OTA">BargainFinderMaxRQ</eb:Service>
         <eb:Action>ErrorRS</eb:Action>
         <eb:MessageData>
            <eb:MessageId>1050662297266000611</eb:MessageId>
            <eb:Timestamp>2018-02-28T08:15:27</eb:Timestamp>
            <eb:RefToMessageId>3230747296278060193</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">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/RESD!ICESMSLB\/RES.LB!-3173602095678878075!1805403!0</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: Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/RESD!ICESMSLB\/RES.LB!-3173602095678878075!1805403!0</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>

P:S .. 我在发送请求时使用了相同的程序 https://sws-crt.cert.havail.sabre.com . The problem started after I switched to https://webservices.havail.com.

**** 出于安全原因被我删除了

请问我在请求中做错了什么

问题很可能是您现在正在 PROD 环境中创建会话 (https://webservices.havail.com) but you are still sending BFM to CERT environment (https://sws-crt.cert.havail.sabre.com)。 确保将两个请求发送到同一端点。