i'm just starting experience with Amadeus API recently,
I'm developing web service on C# and generate SOAP request (including header). When i send request i'm receiving this error as shown you below:
Here's my generated request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://xml.amadeus.com/2010/06/Security_v1" xmlns:link="http://wsdl.amadeus.com/2010/06/ws/Link_v1" xmlns:ses="http://xml.amadeus.com/2010/06/Session_v3" xmlns:pnr="http://xml.amadeus.com/PNRRET_17_2_1A">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<sec:AMA_SecurityHostedUser>
<sec:UserID POS_Type="1" RequestorType="U" PseudoCityCode="***" AgentDutyCode="GS" />
</sec:AMA_SecurityHostedUser>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>***</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">***</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">***</wsse:Nonce>
<wsu:Created>2020-01-06T08:20:54.229Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
<awsl:TransactionFlowLink xmlns:awsl="http://wsdl.amadeus.com/2010/06/ws/Link_v1">
<awsl:Consumer>
<awsl:UniqueID>***</awsl:UniqueID>
</awsl:Consumer>
</awsl:TransactionFlowLink>
<wsa:Action soapenv:mustUnderstand="1">http://webservices.amadeus.com/PNRRET_17_2_1A</wsa:Action>
<wsa:ReplyTo soapenv:mustUnderstand="1">
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID soapenv:mustUnderstand="1">a95b1dd9-bc66-4e45-b3b5-9856d26cf73d</wsa:MessageID>
<wsa:To soapenv:mustUnderstand="1">https://nodea1.test.webservices.amadeus.com/1asiwgenom</wsa:To>
<ses:Session TransactionStatusCode="Start" />
</soapenv:Header>
<soapenv:Body>
<PNR_Retrieve>
<retrievalFacts>
<retrieve>
<type>2</type>
</retrieve>
<reservationOrProfileIdentifier>
<reservation>
<controlNumber>KQLFMO</controlNumber>
</reservation>
</reservationOrProfileIdentifier>
</retrievalFacts>
</PNR_Retrieve>
</soapenv:Body>
</soapenv:Envelope>
I think my request is correct, because my request working on SOAP UI. And receiving this response
Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:awsse="http://xml.amadeus.com/2010/06/Session_v3" xmlns:awsl="http://wsdl.amadeus.com/2010/06/ws/Link_v1" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<soapenv:Header>
<wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
<wsa:From>
<wsa:Address>https://nodea1.test.webservices.amadeus.com/1asiwgenom</wsa:Address>
</wsa:From>
<wsa:Action>http://webservices.amadeus.com/PNRRET_17_2_1A</wsa:Action>
<wsa:MessageID>urn:uuid:1b0fa3e2-aeab-6c04-e51a-e58eea253740</wsa:MessageID>
<wsa:RelatesTo RelationshipType="http://www.w3.org/2005/08/addressing/reply">a95b1dd9-bc66-4e45-b3b5-9856d26cf73d</wsa:RelatesTo>
<awsl:TransactionFlowLink>
<awsl:Consumer>
<awsl:UniqueID>6G4ZNgagmREbd5+gDBX5UA==</awsl:UniqueID>
</awsl:Consumer>
<awsl:Receiver>
<awsl:ServerID>urn:uuid:70a5c12d-315b-547f-9e5b-39df6437c2cb</awsl:ServerID>
</awsl:Receiver>
</awsl:TransactionFlowLink>
<awsse:Session TransactionStatusCode="InSeries">
<awsse:SessionId>00JOZSQJ2S</awsse:SessionId>
<awsse:SequenceNumber>1</awsse:SequenceNumber>
<awsse:SecurityToken>1GAA2YMB6MTOR1ZLRG5QLKPIEH</awsse:SecurityToken>
</awsse:Session>
</soapenv:Header>
<soapenv:Body>
<soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>soap:Server</faultcode>
<faultstring>1931|Application|NO MATCH FOR RECORD LOCATOR</faultstring>
<faultactor>SI:Backend</faultactor>
</soap:Fault>
</soapenv:Body>
</soapenv:Envelope>
UPDATE: I explored additional error as below
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>12|Presentation|soap message header incorrect</faultstring>
<faultactor>SI:muxDZ2</faultactor>
</soap:Fault>
</soap:Body>
</soap:Envelope>
It gives me soap message header incorrect error. But my request is working from SOAP UI.
i solved my problem, my HTTPWebRequest was incorrect.
Here's my correct code. webRequest.Headers.Add value should be same as SOAP request action value.
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.Credentials = CredentialCache.DefaultNetworkCredentials;
webRequest.Headers.Add("SOAPAction:\"http://webservices.amadeus.com/PNRRET_17_2_1A\"");
webRequest.ContentType = "text/xml; charset=utf-8";
webRequest.Accept = "text/xml";
webRequest.Method = "POST";
return webRequest;
SOAP Request:
<add:Action xmlns:add=""http://www.w3.org/2005/08/addressing"">http://webservices.amadeus.com/PNRRET_17_2_1A</add:Action>
If anyone have same problem, i'm ready to help