ConstructFarerulesRQ解析失败 - 视觉工作室Web参考命名约定错误



我试图从Saber调用ConstructFarerulesRQ API,但似乎该API与Saber API的其余API不同。将WSDL文件添加到我的项目后,我希望Web Service Call方法将被命名为ConstructFarerulesRqservice之类的东西,但这不存在。取而代之的是,我将ConstructFareruleSRQ作为实际服务和ConstructFarerulesRQ1作为XML消息的包装类。由于包装器类具有错误的名称,因此在序列化时,它会创建一个虚假的XML消息(请参阅下文(。

我知道我可能可以挖掘参考文件并进行查找/替换,但是我担心,每当新版本在线时,这样做会要求我做同样的事情。还有其他人遇到过吗,还是我疯了?

示例XML有效载荷返回"错误错误code =" 009400" errormessage =" parse失败 - 无效的请求 - saber:

<?xml version="1.0" encoding="utf-16"?>
<StructureFareRulesRQ1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <PriceRequestInformation CurrencyCode="USD" BuyingDate="2019-05-21T13:46:00" xmlns="http://webservices.sabre.com/sabreXML/2003/07">
    <PassengerTypes>
      <PassengerType Code="ADT" />
    </PassengerTypes>
    <ReturnAllData />
  </PriceRequestInformation>
  <AirItinerary xmlns="http://webservices.sabre.com/sabreXML/2003/07">
    <OriginDestinationOptions>
      <OriginDestinationOption>
        <FlightSegment SegmentType="A" DepartureDate="2019-08-17T17:35:00" BookingDate="2019-05-21T13:46:00" RealReservationStatus="SS">
          <DepartureAirport LocationCode="ORD" />
          <ArrivalAirport LocationCode="HEL" />
          <MarketingAirline Code="AY" />
          <OperatingAirline Code="AY" />
        </FlightSegment>
        <PaxTypeInformation FareBasisCode="IFLE2US2" PassengerType="ADT" FareComponentNumber="0" />
      </OriginDestinationOption>
      <OriginDestinationOption>
        <FlightSegment SegmentType="A" DepartureDate="2019-08-18T13:25:00" BookingDate="2019-05-21T13:46:00" RealReservationStatus="SS">
          <DepartureAirport LocationCode="HEL" />
          <ArrivalAirport LocationCode="SVO" />
          <MarketingAirline Code="AY" />
          <OperatingAirline Code="SU" />
        </FlightSegment>
        <PaxTypeInformation FareBasisCode="IFLE2US2" PassengerType="ADT" FareComponentNumber="0" />
      </OriginDestinationOption>
      <OriginDestinationOption>
        <FlightSegment SegmentType="A" DepartureDate="2019-08-29T10:40:00" BookingDate="2019-05-21T13:46:00" RealReservationStatus="SS">
          <DepartureAirport LocationCode="SVO" />
          <ArrivalAirport LocationCode="HEL" />
          <MarketingAirline Code="AY" />
          <OperatingAirline Code="SU" />
        </FlightSegment>
        <PaxTypeInformation FareBasisCode="IFLE2US2" PassengerType="ADT" FareComponentNumber="0" />
      </OriginDestinationOption>
      <OriginDestinationOption>
        <FlightSegment SegmentType="A" DepartureDate="2019-08-29T13:55:00" BookingDate="2019-05-21T13:46:00" RealReservationStatus="SS">
          <DepartureAirport LocationCode="HEL" />
          <ArrivalAirport LocationCode="ORD" />
          <MarketingAirline Code="AY" />
          <OperatingAirline Code="AY" />
        </FlightSegment>
        <PaxTypeInformation FareBasisCode="IFLE2US2" PassengerType="ADT" FareComponentNumber="0" />
      </OriginDestinationOption>
    </OriginDestinationOptions>
  </AirItinerary>
</StructureFareRulesRQ1>

你好,我认为constructfarerulesrq1必须是constructfarerulelesrq。https://beta.developer.sabre.com/docs/soap_apis/air/air/get_structured_fare_rules

相关内容

  • 没有找到相关文章

最新更新