2017-12-31 227 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名前空間に無効なサービスのバージョンを使用しているように見えるこの1の例外

<?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"* 
関連する問題