我收到以下错误消息军刀 - 酒店预订API - 错误
<faultcode>soap-env:Client.InvalidSecurityToken</faultcode><faultstring>Invalid or Expired binary security token: null</faultstring><detail><StackTrace>com.sabre.universalservices.base.security.AuthenticationException: errors.session.USG_INVALID_SECURITY_TOKEN</StackTrace></detail></soap-env:Fault></soap-env:Body></soap-env:Envelope>
以下是我的要求酒店供应API。
<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" SOAP-ENV:mustUnderstand="0">
<eb:From>
<eb:PartyId eb:type="urn:x12.org:IO5:01">client</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="urn:x12.org:IO5:01">ws</eb:PartyId>
</eb:To>
<eb:CPAId>'.$pcc.'</eb:CPAId>
<eb:ConversationId>YourConversationId</eb:ConversationId>
<eb:Service eb:type="sabreXML"></eb:Service>
<eb:Action>OTA_HotelAvailLLSRQ</eb:Action>
</eb:MessageHeader>
<Security xmlns:ns6="http://schemas.xmlsoap.org/ws/2002/12/secext" SOAP-ENV:mustUnderstand="0">
<BinarySecurityToken>'.$sabreKey.'</BinarySecurityToken>
</Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<eb:OTA_HotelAvailRQ xmlns:eb="http://webservices.sabre.com/sabreXML/2003/07" TimeStamp="2011-01-26T12:30:00-06:00" Version="1.10.1">
<eb:POS>
<eb:Source PseudoCityCode="'.$pcc.'" /></eb:POS>
<eb:AvailRequestSegments>
<eb:AvailRequestSegment>
<eb:StayDateRange Start="12-10" End="12-15" />
<eb:RoomStayCandidates>
<eb:RoomStayCandidate>
<eb:GuestCounts>
<eb:GuestCount Count="1" /></eb:GuestCounts>
</eb:RoomStayCandidate>
</eb:RoomStayCandidates>
<eb:HotelSearchCriteria xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="eb:HotelSearchCriteria_type0">
<eb:Criterion>
<eb:HotelRef HotelCityCode="DFW" /></eb:Criterion>
</eb:HotelSearchCriteria>
</eb:AvailRequestSegment>
</eb:AvailRequestSegments>
</eb:OTA_HotelAvailRQ>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
这是我发出请求到酒店预订API之前做了什么。我收到了我的wsse:来自SessionCreateRQ的BinarySecurityToken将包含该令牌的变量存储到。
<BinarySecurityToken>'.$sabreKey.'</BinarySecurityToken>
为什么我得到这个错误消息我的凭据是正确的。顺便说一句,我有生产证书。
谢谢,我很期待一些帮助
感谢您的回复。布鲁诺。这两个请求都被发送到同一端点。我找出问题所在,那不是它。我会在几分钟后发布解决方案,因为我确信我的解决方案将有助于很多未来面临同样问题的人。 –