2016-10-21 6 views
0

새로운 GetHotelDescriptiveInfo 서비스로 작업하고 있으며 문제없이 이전에 다른 v1 요청을 만들었으므로 메시지 헤더 개체를 만들었지 만이 서비스에서는 나는 다음과 같은 에러 응답을 얻는다 :GetHotelDescriptiveInfo 비누 - 'SabreHeader/Service Missing or incomplete'오류

<ns4:ApplicationResults xmlns:ns4="http://services.sabre.com/STL_Payload/v02_01" status="NotProcessed"> 
    <ns4:Error type="Validation" timeStamp="2016-10-21T08:15:07.497-05:00"> 
     <ns4:SystemSpecificResults> 
      <ns4:Message code="ERR.NGHP-CONTENT.CLIENT.INVALID_REQUEST"> 
       SabreHeader/Service missing or incomplete 
      </ns4:Message> 
     </ns4:SystemSpecificResults> 
    </ns4:Error> 
</ns4:ApplicationResults> 

다음은 MessageHeader 객체를 생성하는 데 사용되는 코드이다.

MessageHeader header = new MessageHeader(); 
header.ConversationId = this.Session.ConversationId; 

From from = new From(); 
PartyId fromPartyId = new PartyId(); 
fromPartyId.Value = "WebServiceClient"; 
PartyId[] fromPartyIdArr = new PartyId[1]; 
fromPartyIdArr[0] = fromPartyId; 
from.PartyId = fromPartyIdArr; 
header.From = from; 

To to = new To(); 
PartyId toPartyId = new PartyId(); 
toPartyId.Value = "WebServiceSupplier"; 
PartyId[] toPartyIdArr = new PartyId[1]; 
toPartyIdArr[0] = toPartyId; 
to.PartyId = toPartyIdArr; 
header.To = to; 

header.CPAId = this.Session.PCC; 
header.Action = "GetHotelDescriptiveInfoRQ"; 
header.Service = new Service(); 
header.Service.Value = "GetHotelDescriptiveInfoRQ"; 

MessageData msgData = new MessageData(); 
msgData.MessageId = String.Format("mid:{0}@clientofsabre.com1", DateTime.Now.ToString("yyyyMMDD-HHmmss-ffff")); 
msgData.Timestamp = String.Format("{0}Z", DateTime.UtcNow.ToString("s")); 
header.MessageData = msgData; 

머리글에 무엇이 누락되어 있는지 잘 모르겠습니다. 그것이 정보 일지라도 나는 서비스 가치가 잘못되었습니다. 나는 서비스 가치의 많은 변이를 성공없이 시도했다. 누구든지 전에이 오류를 건너 왔습니까?

UPDATE : 이하

생성 된 XML의 일례이며, 중요한 데이터는 마스크.

<?xml version="1.0" encoding="utf-8"?> 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmln s: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</Party Id> 
      </To> 
      <CPAId>XXXX</CPAId> 
      <ConversationId>XXXXXXXXXXXXXXXX</ConversationId> 
      <Service>GetHotelDescriptiveInfoRQ</Service> 
      <Action>GetHotelDescriptiveInfoRQ</Action> 
      <MessageData> 
       <MessageId>mid:201611DD-0934 [email protected]</MessageId> 
       <Timestamp>2016-11-21T14:3 4:50Z</Timestamp> 
      </MessageData> 
     </MessageHeader> 
     <Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext"> 
      <BinarySecurityToken>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</BinarySecurityToken> 
     </Security> 
    </soap:Header> 
    <soap:Body> 
     <GetHotelDescriptiveInfoRQ xmlns="http://services.sabre.com/hotel/descriptiveinfo/v1"> 
      <HotelRefs> 
       <HotelRef HotelCode="2355" /> 
       <HotelRef HotelCode="2356" /> 
      </HotelRefs> 
      <DescriptiveInfoRef> 
       <PropertyInfo>true</PropertyInfo> 
       <LocationInfo>true</LocationInfo> 
       <Amenities>true</Amenities> 
       <Airports>true</Airports> 
       <AcceptedCreditCards>false</AcceptedCreditCards> 
      </DescriptiveInfoRef> 
     </GetHotelDescriptiveInfoRQ> 
    </soap:Body> 
</soap:Envelope> 

업데이트 : 나는 REST 구현을 사용하여 작동하도록 서비스를받을 수 있었다 여전히 SOAP 구현에 관한 오류에 대한 호기심입니다. 난 그냥 몸의 주요 요청 태그에 버전 매개 변수를 추가이 오류를 해결

+0

당신이 당신의 코드에서 생성 된 XML을 공유 할 수 있습니까? – fcarreno

+0

xml 샘플로 원본 게시물이 업데이트되었습니다. –

답변

1

감사 : 버전 = "1.0.0".

전 :

<GetHotelDescriptiveInfoRQ xmlns="http://services.sabre.com/hotel/descriptiveinfo/v1"> 

후 :

<GetHotelDescriptiveInfoRQ version="1.0.0" xmlns="http://services.sabre.com/hotel/descriptiveinfo/v1">