获取OTA_AirRulesRQ API失败。已创建请求:
<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>作为响应,得到的错误如下:
<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请求的信封和邮件头标签。有没有人能帮个忙。如果有人成功做到了这一点。
发布于 2018-11-06 23:05:35
你有没有试过添加以下内容作为信封?
<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>发布于 2018-10-30 13:07:43
我相信你有正确的信封结构。您的请求的问题是您使用的是预订机舱类代码,而不是farebasis代码。这里的FareBasis代码是"V2SPOWNP“:
<FareBasis Cabin="Y" Code="**V2SPOWNP**" FareAmount="43.41".........."这在您的情况下会有所不同。
改变它,试一试。
https://stackoverflow.com/questions/53040900
复制相似问题