PHP Soap (Server) - php

I am trying to create a webservice using the PHP Soap extension and I am having problems with the .wsdl. Is there an easy way to generate 2.0 wsdl's? Where is a good site (or book) that I can look to in order to determine how to build the WSDL? I have no problem getting my soap client to retrieve soap messages from other web services so I know soap is installed and working. I have found a few links out there that generate WSDL's for you, but most of the sites are down. Any help pointing me in the right direction would be helpful

PHP does not have a built-in WSDL generation utility. I would recommend using Zend_Soap_Server which supports WSDL generation via its Autodiscover feature.

Related

PHP SOAP OTA Connection

for a customer I want to implement the OTA service in an interface to check availabilty and things like that.
I've downloaded the 2017 specifications from OpenTravel. But I lack some information. I want to realize it with PHP and SOAP and later connect it to Magento. But I can't find any url for the SOAP client to send those XMLs to.
I would greatly appreciate any help on this topic or maybe suggestions to do it in an easier way.
Greetings
Consuming OTA SOAP web services is tricky as PHP SoapClient class does not handle it properly.
First you should generate the PHP sdk from the WSDL corresponding to the availabilities you need to send requests to. You should give the PackageGenerator project from Github a try.
Nevertheless, as I said, the native PHP SoapClient class does not map the parameters to the XML request correctly. This is where you have to write your proper code to handle the mapping from the PHP objects to the XML request.
As I work regularly on these sorte of issues, I can help you further but only privately at contact#wsdltophp.com.

Zend SOAP Server - Implementing a pre-existing WSDL to support a client

QuickBooks Web Connector is a Windows client that can communicate with a SOAP server to synchronize QuickBooks data. They supply a QuickBooks Web Connector WSDL file which defines the functions supported by QuickBooks Web Connector. I am using the Zend_Soap_AutoDiscover class to generate the WSDL, but QuickBooks Web Connector does not understand the response.
How do I write a Zend SOAP Server class that will implement this pre-existing WSDL?
I ended up NOT using Zend_Soap classes at all, and am using the QuickBooks PHP DevKit Server. I'd still like to know how to accomplish this with the Zend_Soap classes.
Zend_Soap_AutoDiscover is used to generate a WSDL from an existing class. Usually this is used when setting up your own SOAP Server / Web Services. It sounds like you are trying to go the other way and get / send data to Quickbooks. If so, look into Zen_Soap_Client

how to do SOAP request in PHP code

My website is written in PHP. How should I write the PHP code to send a SOAP request to another server and parse the response.
The link below is the server who can accept the request.
http://gisdata.usgs.gov/XMLWebServices2/Elevation_Service.asmx?op=getElevation
Thanks.
You have options.
If it's available on your server, there's a native SoapClient extension for php. You could use that.
Or, you might prefer the Zend_Soap library, which is part of the Zend Framework, but can easily be used independently.
There venerable nuSoap library is an old standby.

Consuming a php soap web service with excel2007

I'm trying to figure out how to connect Excel 2007 to php5 based web services.
I found this pretty interessting article on the topic. Ok, so it seems to be
doable. Now, php5 soap services don't accept parameters in url form, so a RESTesque call like
http://domain.org/service.php?getme=something
won't work out since there are soap request envelopes to be transfered...
Does anyone have experiences / hints for me on this topic?
tia
K
It looks like excel just does simple get requests. You will need to write a non-soap interface to your php web service.

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!
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.
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.

Categories