我正在使用OTA_AirAvailRQ API获取可用航班的列表。我想获取航班的票价和税费信息,但是OTA_AirPriceRQ API给我一个错误。
这是我的要求:
<OTA_AirPriceRQ Version="2.17.0" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OriginDestinationInformation>
<FlightSegment ArrivalDateTime="2019-02-21T17:00" ConnectionInd="O" DepartureDateTime="2019-02-21T15:00" FlightNumber="802" ResBookDesigCode="Y" RPH="1">
<DestinationLocation LocationCode="KUL"/>
<MarketingCarrier Code="OD" FlightNumber="802"/>
<OriginLocation LocationCode="SIN"/>
</FlightSegment>
</OriginDestinationInformation>
<PriceRequestInformation Retain="true">
<OptionalQualifiers>
<PricingQualifiers CurrencyCode="USD">
<PassengerType Code="ADT" Force="true" Quantity="1"/>
</PricingQualifiers>
</OptionalQualifiers>
</PriceRequestInformation>
</OTA_AirPriceRQ>
这是API的响应:
<OTA_AirPriceRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01" Version="2.17.0">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="BusinessLogic" timeStamp="2019-01-29T02:59:18-06:00">
<stl:SystemSpecificResults>
<stl:Message>FORMAT, CHECK SEGMENT NUMBER-0003</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</OTA_AirPriceRS>
答案 0 :(得分:0)
您可能要删除请求中的OriginDestination节点。根据未使用的服务设计:
<!-- Optional -->
<!-- Repeat Factor=0 -->
<!--Please note that this node is reserved for future expansion and is not currently in use.-->
我建议您在主请求节点中使用ReturnHostCommand =“ true”属性,以返回WP格式,并能够查看要发送给本机Sabre的格式。