在尝试使用 Mozila 海报、Google restclient 应用程序或我的 .net 代码等 SoapUI 调用我的 Amadeus Fare_masterpricetravelboard 服务时,它返回以下错误消息:



相同的网络服务在 SOAP UI 工具中运行良好。

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://xml.amadeus.com/2010/06/Security_v1" xmlns:typ="http://xml.amadeus.com/2010/06/Types_v1" xmlns:iat="http://www.iata.org/IATA/2007/00/IATA2010.1" xmlns:app="http://xml.amadeus.com/2010/06/AppMdw_CommonTypes_v3" xmlns:link="http://wsdl.amadeus.com/2010/06/ws/Link_v1" xmlns:ses="http://xml.amadeus.com/2010/06/Session_v3" xmlns:fmp="http://xml.amadeus.com/FMPTBQ_10_3_1A">
  <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <add:MessageID xmlns:add="http://www.w3.org/2005/08/addressing">65449120-2aa0-46b0-9dcc-c40c6439836c</add:MessageID>
    <wsa:Action>http://webservices.amadeus.com/FMPTBQ_10_3_1A</wsa:Action>
    <add:To xmlns:add="http://www.w3.org/2005/08/addressing">https://nodeD1.test.webservices.amadeus.com/1ASIWIBEWWZ</add:To>
    <link:TransactionFlowLink xmlns:link="http://wsdl.amadeus.com/2010/06/ws/Link_v1" />
    <oas:Security xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <oas:UsernameToken oas1:Id="UsernameToken-1" xmlns:oas1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <oas:Username>WSWWZIBE</oas:Username>
        <oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">EoCeDbDbThB=</oas:Nonce>
        <oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">Hr2HRG8j0dTH19kh52wQ5aqMxhU=</oas:Password>
        <oas1:Created>2014-07-19T12:33:47:530Z</oas1:Created>
      </oas:UsernameToken>
    </oas:Security>
    <AMA_SecurityHostedUser xmlns="http://xml.amadeus.com/2010/06/Security_v1">
      <UserID POS_Type="1" PseudoCityCode="THRI4213V" RequestorType="U" />
    </AMA_SecurityHostedUser>
  </soapenv:Header>
  <soapenv:Body>
    <Fare_MasterPricerTravelBoardSearch>
      <numberOfUnit>
        <unitNumberDetail>
          <numberOfUnits>1</numberOfUnits>
          <typeOfUnit>PX</typeOfUnit>
        </unitNumberDetail>
        <unitNumberDetail>
          <numberOfUnits>250</numberOfUnits>
          <typeOfUnit>RC</typeOfUnit>
        </unitNumberDetail>
      </numberOfUnit>
      <paxReference>
        <ptc>ADT</ptc>
        <traveller>
          <ref>1</ref>
        </traveller>
      </paxReference>
      <fareOptions>
        <pricingTickInfo>
          <pricingTicketing>
            <priceType>RP</priceType>
            <priceType>RU</priceType>
            <priceType>TAC</priceType>
          </pricingTicketing>
        </pricingTickInfo>
      </fareOptions>
      <itinerary>
        <requestedSegmentRef>
          <segRef>1</segRef>
        </requestedSegmentRef>
        <departureLocalization>
          <departurePoint>
            <locationId>CDG</locationId>
          </departurePoint>
        </departureLocalization>
        <arrivalLocalization>
          <arrivalPointDetails>
            <locationId>LHR</locationId>
          </arrivalPointDetails>
        </arrivalLocalization>
        <timeDetails>
          <firstDateTimeDetail>
            <timeQualifier>TA</timeQualifier>
            <date>041114</date>
            <time>2200</time>
            <timeWindow>4</timeWindow>
          </firstDateTimeDetail>
          <rangeOfDate>
            <rangeQualifier>C</rangeQualifier>
            <dayInterval>1</dayInterval>
          </rangeOfDate>
        </timeDetails>
      </itinerary>
    </Fare_MasterPricerTravelBoardSearch>
  </soapenv:Body>
</soapenv:Envelope>

回复:
<soap:Envelope>
 <soap:Header>
<wsa:Action>http://www.w3.org/2005/08/addressing/fault</wsa:Action>
<wsa:MessageID>urn:uuid:0ce4ebc0-7753-6394-4945-c7e8f81c2c49</wsa:MessageID>
<wsa:RelatesTo RelationshipType="http://www.w3.org/2005/08/addressing/reply">65449120-2aa0-46b0-9dcc-c40c6439836c</wsa:RelatesTo>
 <wsa:FaultDetail>
<wsa:ProblemHeaderQName>wsa:To</wsa:ProblemHeaderQName>
<wsa:ProblemIRI>https://nodeD1.test.webservices.amadeus.com/1ASIWIBEWWZ</wsa:ProblemIRI>
 </wsa:FaultDetail>
 </soap:Header>
<soap:Body>
 <soap:Fault>
<faultcode>wsa:InvalidAddressingHeader</faultcode>
<faultstring>A header representing a Message Addressing Property is not valid and the message cannot be processed</faultstring>
<faultactor>SI:muxDZ1</faultactor>
 </soap:Fault>
</soap:Body>
 </soap:Envelope>

最佳答案

确保 Web 请求的 url 与标签“add:To”的值匹配,包括字母大小写。

可能您正在 .net 中开发,即使您将 url 设置为相同的字母大小写,请求也会发送到小写的地址。所以 nodeD1 在 http 层变成 noded1 但在soap包络中仍然是nodeD1。小心在两个字段中使用小写或大写

10-08 15:20