首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >获取OTA_AirRulesRQ API失败

获取OTA_AirRulesRQ API失败
EN

Stack Overflow用户
提问于 2018-10-29 15:44:08
回答 2查看 188关注 0票数 0

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

代码语言:javascript
复制
<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>

作为响应,得到的错误如下:

代码语言:javascript
复制
<faultstring>Unable to create envelope from given source: com.sun.xml.messaging.saaj.soap.dom4j.ElementImpl cannot be cast to com.sabre.universalservices.saaj.soap.Envelope</faultstring>

在sabre dev门户上,找不到此API请求的信封和邮件头标签。有没有人能帮个忙。如果有人成功做到了这一点。

EN

回答 2

Stack Overflow用户

发布于 2018-11-06 23:05:35

你有没有试过添加以下内容作为信封?

代码语言:javascript
复制
    <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>
票数 0
EN

Stack Overflow用户

发布于 2018-10-30 13:07:43

我相信你有正确的信封结构。您的请求的问题是您使用的是预订机舱类代码,而不是farebasis代码。这里的FareBasis代码是"V2SPOWNP“:

代码语言:javascript
复制
<FareBasis Cabin="Y" Code="**V2SPOWNP**" FareAmount="43.41".........."

这在您的情况下会有所不同。

改变它,试一试。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53040900

复制
相关文章

相似问题

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