2

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!

Ryan Kohn
  • 13,079
  • 14
  • 56
  • 81

4 Answers4

3

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

David Snabel-Caunt
  • 57,804
  • 13
  • 114
  • 132
1

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.

Jeremy
  • 2,651
  • 1
  • 21
  • 28
1

PHP can be used to call SOAP pretty effectively.

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

Ólafur Waage
  • 68,817
  • 22
  • 142
  • 198
0

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.

John McCollum
  • 5,162
  • 4
  • 34
  • 50