首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在调用PassengerDetailsRQ时不断得到ERR.SWS.CLIENT.VALIDATION_FAILED异常

在调用PassengerDetailsRQ时不断得到ERR.SWS.CLIENT.VALIDATION_FAILED异常
EN

Stack Overflow用户
提问于 2017-12-31 22:46:49
回答 1查看 712关注 0票数 0

我在C#中使用了Sabre SOAP Api。我成功地从会话创建中获得了响应,我将wsdl Service Reference 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中所给出的那样。

这是我要发送给sabre并获取异常xml

代码语言:javascript
复制
<?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="www.usamaalam60@gmail.com" ShortText="AmericaTours" />
      <Email Address="admin@koreaonly.com" ShortText="AmericaTours" />
      <PersonName NameNumber="1.1" NameReference="MR" PassengerType="ADT">
        <GivenName>Usama sd</GivenName>
        <Surname>Alam</Surname>
      </PersonName>
    </CustomerInfo>
  </TravelItineraryAddInfoRQ>
</PassengerDetailsRQ>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-01-02 10:06:15

对于这个问题,您似乎对3.2命名空间使用了无效的服务版本。试着这样做:

代码语言:javascript
复制
*xmlns="http://services.sabre.com/sp/pd/v3_2"* and *version="3.2.0"*. 

您在这里使用的是2.2.1版,它需要一个不同的URL。

您是否打算使用3.2.0版本?我可以看到,根据模式,日期也是无效的。您必须:

代码语言:javascript
复制
*DateOfBirth="02/02/1998"*

但应该有:

代码语言:javascript
复制
*DateOfBirth="1998-02-02"*
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48043389

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档