Skip to content
Advertisement

Amadeus e-Power Web Service – issues setting SOAP auth headers

I’m having issues setting AuthenticationSoapHeader for Amadeus e-Power services. I’m using PHP’s built in SoapClient.

WSDL: https://staging-ws.epower.amadeus.com/ws_usitcolours/EpowerService.asmx?WSDL

Basic class I’ve made to test things out:

JavaScript

Sample usage:

JavaScript

Error received:

JavaScript

No matter if I set headers with __setSopHeaders or pass them with the __call method, they are always ignored.. any other ideas how to set them?

Requests for methods that do not require Authentication are working properly.

Interesting thing is that the same request is working with Postman, but not with PHP SoapClient or SoapUI. Postman successful Soap request

Advertisement

Answer

The problem was in the SSL communication between PHP’s built in SoapClient and Amadeus’s .NET server. Somehow the SSL connection could not be established, no matter how I set (force) Soap to use SSL I have always received the https connection must be used error.

Sadly, I did not have more free time to investigate further and I decided to switch to cURL. Here is the simple class I made. Hope it helps someone!

JavaScript

As of HelpersArrayToXml, it is just a simple class by Spatie that converts PHP Array to XML. Source: https://github.com/spatie/array-to-xml

Request XML generated by the above class:

JavaScript

Response:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement