I have been asked by a client to use the data web services offered by a 3rd party onto their Wordpress pages. The benefit of this is that for certain pages, they won't have to manually update anything, when the page is requested, it will grab the information from the 3rd party, I just don't know how to do it.
I found one question on the Wordpress forums that seemed identical to mine, but the response was vague and this is something I know absolutely nothing on so I was not able to get it to work. Is anyone else able to help me?
The URL I mentioned was: https://wordpress.org/support/topic/soap-12-integration-into-wordpress
I have written the SOAP request, but I don't understand what to do with it next so the Wordpress page grabs it every time it is loaded. My request is below.
POST /path/to/asmx/file HTTP/1.1
Host: www.temp.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 500
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetAvailableMeetings xmlns="http://www.temp.com/path/to/webservices">
<clubId>00000</clubId>
</GetAvailableMeetings>
</soap12:Body>
</soap12:Envelope>
Any help would be greatly appreciated.
Trido,
You're question is a little vague - presumably you want to extract some data from the SOAP service, and show it on the page?
Your best bet would be to use PHP's SoapClient class - see http://php.net/manual/en/class.soapclient.php
Depending on whether your service has a WSDL file or not, or what data you are trying to use, exactly how you'd do this would vary, but the basic idea is that you'd send a request using the SoapClient, which returns an object representing the return XML, which you can then output on your page as required.