使用Sabre EnhancedAirPriceRQ保存机票预订遇XML验证错误求助
Sabre OTA_AirPriceLLSRQ XML验证错误(cvc-complex-type.2.4.a)修复方案
错误原因
响应中的cvc-complex-type.2.4.a错误明确指出:NetRemit元素的位置不符合Schema定义。在PricingQualifiers节点下,PassengerType之后只能出现指定的元素(如PlusUp、RetailerRuleQualifier等),而你将NetRemit、NetOnly等净价相关元素直接放在了PassengerType之后,违反了XML结构约束。
修复方法
根据Sabre OTA_AirPriceLLSRQ v2.14.0的规范,净价相关的NetRemit、NetOnly元素需要放在OptionalQualifiers下的NetQualifiers节点中,而非直接嵌套在PricingQualifiers内。同时StoredFareIndicator属于PricingQualifiers的合法子元素,需调整到Schema允许的位置。
修改后的请求报文
<?xml version='1.0' encoding='UTF-8'?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader"> <soapenv:Header> <eb:MessageHeader soapenv:mustUnderstand="1" eb:version="1.0"> <eb:From> <eb:PartyId eb:type="urn: x12.org:IO5: 01">999999</eb:PartyId> </eb:From> <eb:To> <eb:PartyId type="urn:x12.org:IO5:01">123123</eb:PartyId> </eb:To> <eb:CPAId>PCC</eb:CPAId> <eb:ConversationId>1111111111111111111</eb:ConversationId> <eb:Service eb:type="sabreXML">OTA_AirPriceLLSRQ</eb:Service> <eb:Action>OTA_AirPriceLLSRQ</eb:Action> <eb:MessageData> <eb:MessageId>mid:0_2014-09-22T21:43:40m</eb:MessageId> <eb:Timestamp>2014-09-22T21:43:40</eb:Timestamp> <eb:TimeToLive>2014-09-22T21:43:40</eb:TimeToLive> </eb:MessageData> <eb:DuplicateElimination/> <eb:Description>Air Price Service</eb:Description> </eb:MessageHeader> <sec:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility"> <sec:BinarySecurityToken>Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/RESG!ICESMSLB\/RES.LB!1755187361318!4892!525</sec:BinarySecurityToken> </sec:Security> </soapenv:Header> <soapenv:Body> <OTA_AirPriceRQ 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" Version="2.14.0"> <PriceRequestInformation Retain="true"> <OptionalQualifiers> <!-- 新增NetQualifiers节点存放净价相关元素 --> <NetQualifiers> <NetRemit/> <NetOnly/> </NetQualifiers> <PricingQualifiers CurrencyCode="CAD"> <PassengerType Code="ADT" Quantity="1"/> <StoredFareIndicator/> <FareBasisCodes> <FareBasisCode SegmentNumber="1"> <Code>LAVD0ZBG</Code> <TicketDesignator>SLO</TicketDesignator> </FareBasisCode> </FareBasisCodes> <ItineraryOptions> <SegmentSelect Number="1" RPH="1"/> </ItineraryOptions> </PricingQualifiers> </OptionalQualifiers> </PriceRequestInformation> </OTA_AirPriceRQ> </soapenv:Body> </soapenv:Envelope>
关键修改点
- 将
NetRemit、NetOnly从PricingQualifiers节点下迁移到OptionalQualifiers下新增的NetQualifiers节点中 - 保留
StoredFareIndicator在PricingQualifiers内,调整到PassengerType之后的合法位置
内容的提问来源于stack exchange,提问作者Heemanshu Bhalla
相关产品推荐
相关产品推荐

