2016-12-04 4 views
0

내가세이버 - 호텔 가용성 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> 

다음은 호텔 이용 가능 여부 요청을하기 전에 내가 한 일입니다. 내 wsese받은 : BinarySecurityToken SessionCreateRQ에서 토큰을 포함하는 변수를 저장합니다.

<BinarySecurityToken>'.$sabreKey.'</BinarySecurityToken>                    

왜이 오류 메시지가 나타나는 지 내 자격 증명이 올바른 것입니다. 나는 생산 자격 증명을 가지고 있습니다. 이 보안 토큰이 올바른지 긍정적 인 경우, 잘못된 환경에서 작업 할 수

답변

0

덕분에 나는 약간의 도움을 기대하고있다. 예를 들어 PROD에서 세션을 만들었지 만 이후 요청을 CERT로 보낸 경우이 오류가 반환됩니다.

두 요청이 모두 동일한 끝점으로 보내지는지 확인하십시오. 문제가 지속되면 헬프 데스크에 문의하십시오.

+0

답장을 보내 주셔서 감사합니다. 브루노. 두 곳 모두 동일한 엔드 포인트로 보내지는 곳을 요청합니다. 나는 그 문제가 무엇인지 알아 냈다. 그렇지 않았다. 나는 내 솔루션이 앞으로도 똑같은 문제에 직면 할 많은 사람들을 도울 것이라고 확신하므로 몇 분 안에 솔루션을 게시 할 것입니다. –

0

문제가 해결되었습니다. 다음은 세이버 문서가 요청에 다음 태그를 포함시키는 것입니다.

<eb:Security xmlns:ns6="http://schemas.xmlsoap.org/ws/2002/12/secext" SOAP-ENV:mustUnderstand="0"> 
     <eb:BinarySecurityToken>'.$sabreKey.'</eb:BinarySecurityToken> 
    </eb:Security> 

하지만 오류가 발생했습니다.

그래서 나는 eb 네임 스페이스와 태그를 제거하려고 시도했다.

<Security xmlns:ns6="http://schemas.xmlsoap.org/ws/2002/12/secext" SOAP-ENV:mustUnderstand="0"> 
     <BinarySecurityToken>'.$sabreKey.'</BinarySecurityToken> 
    </Security> 

내 결과에서 xml 요청을 살펴 봅니다. 이것이 효과가 없다는 것을 알게 될 것입니다. 그런 다음 태그를 다시 변경하고 작동하도록했습니다.

내가 지금 사용하고있는 태그는 내가 읽었던 문서가 아닌 곳에서 사용됩니다. 저를 혼란스럽게 만들었습니다. 다음 태그를 사용하면 어떻게 작업 요청을 얻었습니까?

<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"> 
<wsse:BinarySecurityToken valueType="String"  EncodingType="wsse:Base64Binary">'.$sabreKey.'</wsse:BinarySecurityToken> 
</wsse:Security> 

이 태그가 내려지면 문서에 결함이 있으므로 많은 사람들에게 도움이 될 것입니다.