C# Amadeus服务中出错:表示消息寻址属性的标头无效,无法处理该消息

C# Amadeus服务中出错:表示消息寻址属性的标头无效,无法处理该消息,c#,web-services,c#-3.0,amadeus,C#,Web Services,C# 3.0,Amadeus,当尝试使用mozila poster、Google restclient应用程序或my.net代码等SoapUI调用我的Amadeus Fare_MasterPrice Travelboard服务时,它返回以下错误消息: 表示消息寻址属性的标头无效,无法处理该消息 同样的Web服务在SOAP UI工具中运行良好 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="htt

当尝试使用mozila poster、Google restclient应用程序或my.net代码等SoapUI调用我的Amadeus Fare_MasterPrice Travelboard服务时,它返回以下错误消息:

表示消息寻址属性的标头无效,无法处理该消息

同样的Web服务在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>

65449120-2aa0-46b0-9dcc-c40c6439836c
http://webservices.amadeus.com/FMPTBQ_10_3_1A
https://nodeD1.test.webservices.amadeus.com/1ASIWIBEWWZ
WSWWZIBE
EOCEDBTBHB=
Hr2HRG8j0dTH19kh52wQ5aqMxhU=
2014-07-19T12:33:47:530Z
1.
军中福利社
250
钢筋混凝土
ADT
1.
反相
茹
交咨会
1.
CDG
LHR
助教
041114
2200
4.
C
1.
答复:

<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>

http://www.w3.org/2005/08/addressing/fault
urn:uuid:0ce4ebc0-7753-6394-4945-c7e8f81c2c49
65449120-2aa0-46b0-9dcc-c40c6439836c
wsa:到
https://nodeD1.test.webservices.amadeus.com/1ASIWIBEWWZ
wsa:InvalidAddressingHeader
表示消息寻址属性的标头无效,无法处理该消息
SI:muxDZ1

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


可能您是在.net中开发的,即使您在相同的字母大小写中设置了url,请求也将以小写形式发送到该地址。所以nodeD1在http层中变成nodeD1,但在soap信封中保持nodeD1。小心在这两个字段中使用小写或大写

太好了,你让我又少掉了几天头发。关于小写的评论是正确的。解决了我的问题。谢谢。您是如何向amadeus发送请求的