0
我使用BinarySecurityToken用於EnhancedAirBookRQ,但我收到USG_AUTHORIZATION_FAILED
。我爲BargainFinderMaxRQ使用了相同的標記,並且它工作正常。我是否應該獲得另一組測試憑證,以便提供here的序列?EnhancedAirBookRQ上的驗證錯誤
請求:
<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/2003/05">
<soapenv:Header>
<sec:Security>
<sec:BinarySecurityToken>--Token--</sec:BinarySecurityToken>
</sec:Security>
<mes:MessageHeader>
<mes:From>
<mes:PartyId type="urn:x12.org:IO5:01">from</mes:PartyId>
</mes:From>
<mes:To>
<mes:PartyId type="urn:x12.org:IO5:01">ws</mes:PartyId>
</mes:To>
<mes:CPAId>--CPAId--</mes:CPAId>
<mes:ConversationId>[email protected]</mes:ConversationId>
<mes:Service mes:type="sabreXML">sabreXML</mes:Service>
<mes:Action>EnhancedAirBookRQ</mes:Action>
<mes:MessageData>
<mes:MessageId>00000</mes:MessageId>
<mes:Timestamp>233</mes:Timestamp>
</mes:MessageData>
<mes:Description xml:lang="en-US">Testing</mes:Description>
</mes:MessageHeader>
</soapenv:Header>
<soapenv:Body>
<EnhancedAirBookRQ version="3.7.0" HaltOnError="true">
<OTA_AirBookRQ>
<OriginDestinationInformation>
<FlightSegment DepartureDateTime="2016-11-15T10:05:00" FlightNumber="241" NumberInParty="2"
ResBookDesigCode="F" Status="NN">
<DestinationLocation LocationCode="ATL"/>
<MarketingAirline Code="US" FlightNumber="241"/>
<OriginLocation LocationCode="LAS"/>
</FlightSegment>
</OriginDestinationInformation>
</OTA_AirBookRQ>
</EnhancedAirBookRQ>
</soapenv:Body>
響應:
<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</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI">from</eb:PartyId>
</eb:To>
<eb:CPAId>--CPAId--</eb:CPAId>
<eb:ConversationId>[email protected]</eb:ConversationId>
<eb:Service eb:type="sabreXML">sabreXML</eb:Service>
<eb:Action>ErrorRS</eb:Action>
<eb:MessageData>
<eb:MessageId>2308814425665870610</eb:MessageId>
<eb:Timestamp>2016-11-08T11:49:26</eb:Timestamp>
<eb:RefToMessageId>00000</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">--Token--</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Client.AuthorizationFailed</faultcode>
<faultstring>Authorization failed</faultstring>
<detail>
<StackTrace>com.sabre.universalservices.base.security.AuthorizationException:
errors.authorization.USG_AUTHORIZATION_FAILED
</StackTrace>
</detail>
</soap-env:Fault>
</soap-env:Body>
我聯繫Saber支持以獲取測試憑證以訪問用於應用程序開發的SOAP API。我收到證書並生成令牌並使用它,但它適用於某些API調用(如BargainFinderMaxRQ),並且不適用於某些(如EnhancedAirBookRQ)。好吧,我會聯繫Saber支持。 – Melon
你正在創建調用CreateToken或CreateSession? – jmacagno
使用CreateToken。但我也嘗試過使用CreateSession,但沒有奏效。 – Melon