这是我的请求正文
`<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Base64_token
</wsse:BinarySecurityToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<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="12-24">
<DestinationLocation LocationCode="LHE"/>
<MarketingCarrier Code="AA"/>
<OriginLocation LocationCode="DXB"/>
</FlightSegment>
</OriginDestinationInformation>
<RuleReqInfo>
<FareBasis Code="Y"/>
</RuleReqInfo>
</OTA_AirRulesRQ>
</soap:Body>
</soap:Envelope>`
这是我收到的错误,我该如何修复它。USG_INVALID_ACTION 表示格式错误,但我不明白我的代码中的格式问题是什么。
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">T1RLAQLmuWgGgRgzvWBSZcj2/EuqJCuoqC1hqaF0JFHKYQ+GlRA/190rlR3HglH9lxLudMWoAADQAnrngzMgfJAC3ippxepcykrjbucnnl8Azsk3fgQ1/xsNddLLvmJygXnPSyaS/z4uL/BCoClQDlS8Rq9vbhOIevpCG9jpBT4557sXBDONTKaAedt5uv+2RRA/7gwRcDkH3AOyoxifi6raxDPHntzq9TUgO0sEuah2+WM6f2isg095CUPPdJbYXMwXFyM/xaWgRAIuwrxP24Cnr9bJyEVeS0YzNrK0qSu+zcdW5oAb6KT1IeQSOl1rHG1FafST9TqcLem+LkF6Ah3o3BWKBJXSZw**
</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Client.InvalidAction</faultcode>
<faultstring>Action specified in EbxmlMessage does not exist.</faultstring>
<detail>
<StackTrace>com.sabre.universalservices.base.exception.ApplicationException: errors.xml.USG_INVALID_ACTION</StackTrace>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
如果您使用 Sabre 邮递员集合,则操作将从请求的名称中获取。
来自 ZPre-request 脚本: const action = request.name.split(' ')[0].replace(/^_|[0-9]./, '');
因此,您的请求必须命名为“OTA_AirRulesLLSRQ 2.3.0”之类的名称才能工作。