Question

I have been approached to create a website using Sabre Web Services to power the reservations system. All documentation I have seen refers to .NET or Java solutions, and I was in doubt as to whether PHP can be used, as access is performed using SOAP.

I have found no further information about this, and I assume the answer is yes, but I wonder why there is not a single reference to this being possible. All solutions seem to be .NET!

Was it helpful?

Solution

Yes, PHP can be be used to connect to SOAP web services - take a look at NuSOAP. It allows a nice & easy object oriented way to consume web services.

OTHER TIPS

SOAP is language independent, which means that any language can communicate with the web service if it can generate SOAP requests and handle responses.

PHP's SOAP documentation can be found in the php manual

PHP can be used to call SOAP pretty effectively.

There's a very good tutorial on devzone on how you can use SOAP well.

I've just done a little digging around and it looks like you can use stream_context_create() to create a custom HTTP stream context. This would include the HTTP content type header you need. The resource returned from this function call can then be passed to the SoapClient constructor to be used in SOAP calls. Have a look at http://ca.php.net/stream_context_create and the PHP manual page for the SoapClient constructor (sorry, I can only post one link as a new user) for more information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top