Peter
Peter

Reputation:

Accessing Sabre Web Services using PHP

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!

Upvotes: 2

Views: 3186

Answers (4)

Jeremy
Jeremy

Reputation: 2669

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.

Upvotes: 1

Ólafur Waage
Ólafur Waage

Reputation: 70001

PHP can be used to call SOAP pretty effectively.

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

Upvotes: 1

David Snabel-Caunt
David Snabel-Caunt

Reputation: 58361

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

Upvotes: 3

John McCollum
John McCollum

Reputation: 5142

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.

Upvotes: 0

Related Questions