簡體   English   中英

Postman 中的有狀態 Amadeus Soap Header 4 請求

[英]Stateful Amadeus Soap Header 4 Request in Postman

我正在嘗試使用https://www.getpostman.com/通過 amadeus soap api 進行通信。 所以我確實按照他們的文檔狀態構建了我的 Soap Header v4 請求,但是我最終總是收到一個 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>

因為你得到了11|Session| 錯誤,這意味着您發送的數據不正確。 你需要檢查的東西很少。

  • “祖魯語”時區中的日期時間,因為 Amadeus 將時間驗證為他們的時間,因此只允許 30 分鍾的時差。
  • 密碼摘要算法。
  • 在 30 分鍾內使用相同的隨機數。

我發現這里出了什么問題,我在 Soap-Header (v4)Body 中使用了 Security_Authenticated Request 本身的安全信息。

我刪除了所有安全標頭,這樣它就可以正常工作了,所以工作請求看起來像:

<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://xml.amadeus.com/2010/06/Session_v3">
<SOAP-ENV:Header>
    <ns2:MessageID>X</ns2:MessageID>
    <ns2:Action>http://webservices.amadeus.com/VLSSLQ_06_1_1A</ns2:Action>
    <ns2:To>X</ns2:To>
    <ns3:Session TransactionStatusCode="Start">
    </ns3:Session>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
    <ns1:Security_Authenticate>
        <ns1:userIdentifier>
            <ns1:originIdentification>
                <ns1:sourceOffice>X</ns1:sourceOffice>
            </ns1:originIdentification>
            <ns1:originatorTypeCode>x</ns1:originatorTypeCode>
            <ns1:originator>X</ns1:originator>
        </ns1:userIdentifier>
        <ns1:dutyCode>
            <ns1:dutyCodeDetails>
                <ns1:referenceQualifier>X</ns1:referenceQualifier>
                <ns1:referenceIdentifier>X</ns1:referenceIdentifier>
            </ns1:dutyCodeDetails>
        </ns1:dutyCode>
        <ns1:systemDetails>
            <ns1:organizationDetails>
                <ns1:organizationId>X</ns1:organizationId>
            </ns1:organizationDetails>
        </ns1:systemDetails>
        <ns1:passwordInfo>
            <ns1:dataLength>0</ns1:dataLength>
            <ns1:dataType>X</ns1:dataType>
            <ns1:binaryData>X</ns1:binaryData>
        </ns1:passwordInfo>
    </ns1:Security_Authenticate>
</SOAP-ENV:Body>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM