我正在尝试使用https://www.getpostman.com/通过 amadeus soap api 进行通信。所以我确实按照他们的文档状态构建了我的 Soap Header v4 Request,但是我最终总是收到 SoapFault "11|Session|"
在这种情况下,我还将 HTTP-Header SOAPAction设置为http://webservices.amadeus.com/VLSSLQ_06_1_1A 。
当我使用像https://github.com/amabnl/amadeus-ws-client这样的客户端时,这是可行的,但是当尝试使用邮递员触发相同的请求时,它没有,有什么想法吗?
要求
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://xml.amadeus.com/VLSSLQ_06_1_1A"
xmlns:ns2="http://www.w3.org/2005/08/addressing"
xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-secext-1.0.xsd"
xmlns:ns4="http://xml.amadeus.com/2010/06/Session_v3"
xmlns:ns5="http://xml.amadeus.com/2010/06/Security_v1">
<SOAP-ENV:Header>
<ns2:MessageID>x-x-x-x-x</ns2:MessageID>
<ns2:Action>http://webservices.amadeus.com/VLSSLQ_06_1_1A</ns2:Action>
<ns2:To>https://nodeD1.test.webservices.amadeus.com/AAAAAAAAA</ns2:To>
<oas:Security xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<oas:UsernameToken xmlns:oas1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" oas1:Id="UsernameToken-1">
<oas:Username>AAAAAAAAA</oas:Username>
<oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">aaaaaa==</oas:Nonce>
<oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">aaaaa=</oas:Password>
<oas1:Created>2018-08-28T08:46:39:293Z</oas1:Created>
</oas:UsernameToken>
</oas:Security>
<ns4:Session TransactionStatusCode="Start"/>
<ns5:AMA_SecurityHostedUser>
<ns5:UserID POS_Type="1" PseudoCityCode="AABBBCCDDEE" AgentDutyCode="AA" RequestorType="U"/>
</ns5:AMA_SecurityHostedUser>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<!-- actual request -->
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
回复
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:awsse="http://xml.amadeus.com/2010/06/Session_v3" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<soap:Header>
<wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
<wsa:From>
<wsa:Address>https://nodeD1.test.webservices.amadeus.com/AAAAAAAAA</wsa:Address>
</wsa:From>
<wsa:Action>http://webservices.amadeus.com/VLSSLQ_06_1_1A</wsa:Action>
<wsa:MessageID>urn:uuid:x-x-x-x-x</wsa:MessageID>
<wsa:RelatesTo RelationshipType="http://www.w3.org/2005/08/addressing/reply">yyyyyy-xxxxx</wsa:RelatesTo>
<awsse:Session TransactionStatusCode="End">
<awsse:SessionId>xxxxx</awsse:SessionId>
<awsse:SequenceNumber>1</awsse:SequenceNumber>
<awsse:SecurityToken>xxxxx</awsse:SecurityToken>
</awsse:Session>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring> 11|Session|</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>