2017-12-31 158 views
0

C#에서 Saber SOAP API를 사용하고 있습니다. 세션 생성에서 성공적으로 응답을 얻었습니다. wsdl 서비스 참조 http://files.developer.sabre.com/wsdl/sabreXML1.0.00/ServicesPlatform/PassengerDetails3.3.0RQ.wsdl을 테스트 프로젝트에 추가하고 문서의 https://developer.sabre.com/docs/read/soap_apis/management/itinerary/Passenger_Details에 지정된 요청의 매개 변수에 필요한 값을 전달합니다.PassengerDetailsRQ를 호출 할 때 ERR.SWS.CLIENT.VALIDATION_FAILED 예외가 계속 발생합니다.

이는 내 XML을 사용하면 3.2 네임 스페이스에 대한 잘못된 서비스 버전을 사용하는 것이 하나 들어 사브르 및 얻기 예외

<?xml version="1.0" encoding="utf-16"?> 
    <PassengerDetailsRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.2.1" 
    IgnoreOnError="false"> 
    <MiscSegmentSellRQ xmlns="http://services.sabre.com/sp/pd/v3_2"> 
    <MiscSegment DepartureDateTime="2018-01-10T16:45" InsertAfter="0" NumberInParty="1" Status="HK" Type="OTH"> 
     <OriginLocation LocationCode="SAN" /> 
     <Text>America Tours</Text> 
     <VendorPrefs> 
     <Airline Code="DL" /> 
     </VendorPrefs> 
    </MiscSegment> 
    </MiscSegmentSellRQ> 
    <PostProcessing xmlns="http://services.sabre.com/sp/pd/v3_2"> 
    <EndTransactionRQ> 
     <EndTransaction Ind="true"> 
     <Email Ind="true" /> 
     </EndTransaction> 
     <Source ReceivedFrom="SWS TESTING" /> 
    </EndTransactionRQ> 
    </PostProcessing> 
    <PreProcessing xmlns="http://services.sabre.com/sp/pd/v3_2" /> 
    <PriceQuoteInfo xmlns="http://services.sabre.com/sp/pd/v3_2"> 
    <Link NameNumber="1.1" Record="1" /> 
    </PriceQuoteInfo> 
    <SpecialReqDetails xmlns="http://services.sabre.com/sp/pd/v3_2"> 
    <SpecialServiceRQ> 
     <SpecialServiceInfo> 
     <SecureFlight> 
      <PersonName DateOfBirth="02/02/1998" NameNumber="1.1"> 
      <GivenName>Usama QW</GivenName> 
      <Surname>Alam</Surname> 
      </PersonName> 
      <VendorPrefs> 
      <Airline /> 
      </VendorPrefs> 
     </SecureFlight> 
     </SpecialServiceInfo> 
    </SpecialServiceRQ> 
    </SpecialReqDetails> 
    <TravelItineraryAddInfoRQ xmlns="http://services.sabre.com/sp/pd/v3_2"> 
    <AgencyInfo> 
     <Address> 
     <AddressLine>America Tours</AddressLine> 
     <CityName>Los Angeles</CityName> 
     <CountryCode>US</CountryCode> 
     <PostalCode>90020</PostalCode> 
     <StateCountyProv StateCode="CA" /> 
     <StreetNmbr>3434 West 6th Street Suite 400-6</StreetNmbr> 
     </Address> 
     <Ticketing TicketType="7T-A" /> 
    </AgencyInfo> 
    <CustomerInfo> 
     <ContactNumbers> 
     <ContactNumber NameNumber="1.1" Phone="213-738-8185" PhoneUseType="A" /> 
     <ContactNumber NameNumber="1.1" Phone="3162881034" PhoneUseType="A" /> 
     </ContactNumbers> 
     <Email Address="[email protected]" ShortText="AmericaTours" /> 
     <Email Address="[email protected]" ShortText="AmericaTours" /> 
     <PersonName NameNumber="1.1" NameReference="MR" PassengerType="ADT"> 
     <GivenName>Usama sd</GivenName> 
     <Surname>Alam</Surname> 
     </PersonName> 
    </CustomerInfo> 
    </TravelItineraryAddInfoRQ> 
</PassengerDetailsRQ> 

답변

2

에 보내입니다. 다음과 같이 시도하십시오.

*xmlns="http://services.sabre.com/sp/pd/v3_2"* and *version="3.2.0"*. 

여기에서 버전 2.2.1을 사용 했으므로 다른 URL이 필요합니다.

3.2.0 버전을 사용 하시겠습니까? 스키마별로도 날짜가 유효하지 않음을 알 수 있습니다.

*DateOfBirth="02/02/1998"* 

을하지만이 있어야합니다 : 당신은이

*DateOfBirth="1998-02-02"*