OTA_AirRulesRQ API失败

时间:2018-10-29 07:44:08

标签: sabre

获取OTA_AirRulesRQ API失败。 请求已创建:

from sample_box import gr

while(True):
    if(gr== '22'):

作为响应,将错误显示为:

<OTA_AirRulesRQ ReturnHostCommand="true" Version="2.3.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 DepartureDateTime="17-12">
      <DestinationLocation LocationCode="MAA" />
      <MarketingCarrier Code="AI" />
      <OriginLocation LocationCode="BLR" />
    </FlightSegment>
  </OriginDestinationInformation>
  <RuleReqInfo>
    <FareBasis Code="Y" />
  </RuleReqInfo>
</OTA_AirRulesRQ>

在sabre开发者门户上,未找到此API请求的信封和消息标头标签。任何人都可以帮忙。如果有人成功完成了。

2 个答案:

答案 0 :(得分:0)

您是否尝试过添加以下内容作为信封?

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
   <SOAP-ENV:Header>
      <eb:MessageHeader SOAP-ENV:mustUnderstand="1" eb:version="2.0">
         <eb:From>
            <eb:PartyId type="urn:x12.org:IO5:01">1212</eb:PartyId>
         </eb:From>
         <eb:To>
            <eb:PartyId type="urn:x12.org:IO5:01">2323</eb:PartyId>
         </eb:To>
         <eb:CPAId>XXXX</eb:CPAId>
         <eb:ConversationId>SWS-Test-XXXX</eb:ConversationId>
         <eb:Service eb:type="OTA">EnhancedSeatMapRQ</eb:Service>
         <eb:Action>EnhancedSeatMapRQ</eb:Action>
         <eb:MessageData>
            <eb:MessageId>1001</eb:MessageId>
            <eb:Timestamp>2016-06-07T10:00:01</eb:Timestamp>
            <eb:TimeToLive>2017-06-06T23:59:59</eb:TimeToLive>
         </eb:MessageData>
      </eb:MessageHeader>
      <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility">
         <wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">XXX</wsse:BinarySecurityToken>
      </wsse:Security>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
...
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

答案 1 :(得分:-1)

我相信您的信封结构正确。 您的请求存在的问题是您使用的是预订客舱的代码,而不是出租车的代码。 FareBasis代码在此处为“ V2SPOWNP”:

<FareBasis Cabin="Y" Code="**V2SPOWNP**" FareAmount="43.41".........."

这与您的情况有所不同。

更改它并尝试一下。