Travelport uAPI php SoapClient

2.1k views Asked by At

I need to develop a PHP web based application using Travelport uAPI. I'm able to connect to the webservice using the function curl_init() writing all xml request, but I'm stuck trying to do it with SoapClient class. I'm using this example and doesn't work:

http://demo.travelportuniversalapi.com/Home/SampleCode

I don't know what I'm doing wrong. Anyone knows a working sample code/project in PHP using SoapClient class? I've searched in the web, but I couldn't find anything in PHP.

1

There are 1 answers

0
Brian Tompsett - 汤莱恩 On

(Answered in a question edit. Converted to a community wiki answer. See What is the appropriate action when the answer to a question is added to the question itself? )

The OP wrote:

At last the way to reach my solution has been using the Travelport test tool writing my xml requests and passing a string containing the xml.

Needed for authentication:

$this->credentials["login"]=$user;
$this->credentials["password"]=$pass;
$this->credentials["traceid"]=$traceid; (branchcode)

Then I create the soap client:

$client = new SoapClient("galileo/air_v20_0/Air.wsdl", $this->credentials);
$rsp=$client->__doRequest($this->request, $this->credentials['location'], $this->credentials['soapaction'], $this->credentials['soap_version']);

And this covers my needs :)

Now I'm trying to pass the request info using SoapClient and WSDL functions in this post WSDL functions with the same name. How to choose one?