Anyone got experience of using SOAP?

Soldato
Joined
20 Nov 2002
Posts
11,141
Location
Barnsley
Got a potential client asking for me to make them a new site with info from a database site they use to be integrated via SOAP.

Now I've been doing a bit of digging and as far as I'm aware I can code in the XML request code (into a page/sidebar of my normal CMS site) and their database servers will feed in the response code to that position.

Am I following this correctly or has it gone over my head and there is far more to it?

Cheers for any pointers.
 
That's about it.. but I'm not sure what you mean by "into a page/sidebar of my normal CMS site".

SOAP is a data transfer/RPC protocol. I'm assuming you mean the data will be presented in this page/sidebar?

HTTP-REST would be better though :p
 
It's something that they use to list data so that it's passed around onto the databases/sites they require automatically.

There are XML code snippets available for what they use available for certain requests, so I guess I can use these.

Probably didn't explain myself enough with the quoted comment. Yeah, I mean presented there - so put the XML code into an area of my PHP document and it'll just feed in the response.

Just trying to make sure I'm relatively on the right track, but I guess the best way to learn is to jump in and give it a go :p
 
No not quite.

You'll need to POST the request XML to the server. The server should then give the response XML back, which can then be parsed and then echo'd in your PHP.

There is a SOAP PHP library but I think it requires installation. If you can't do that then try finding another or rolling your own...
 
Cheers for the links, I'll get reading.

I think it's going to be harder than I think though as the code I have is pure XML, ie:

Code:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetAreaDetails xmlns="http://portal.xxxx.com">
      <objAreaIDs>
        <string>string</string>
        <string>string</string>
      </objAreaIDs>
    </GetAreaDetails>
  </soap:Body>

So I figure by those links I'll have to write the PHP to get to that code, which I can see be a pain (for someone who is not a natural developer).

Might as well just show you what I've been given to work with, here - bare in mind I'm not really a developer, it's got me a bit confused. The sample site is in ASP (which I have no experience of) so not much help to me.
 
Last edited:
No not quite.

You'll need to POST the request XML to the server. The server should then give the response XML back, which can then be parsed and then echo'd in your PHP.

There is a SOAP PHP library but I think it requires installation. If you can't do that then try finding another or rolling your own...

Looks like I'm in way over my head then as I can't code my own PHP from scratch - I was thinking it'd be a copy and paste job (importing the data) with me being provided with the request XML but I guess it's not that simple.
 
Back
Top Bottom