[Phpwm] soap/xmlrpc etc

Elliot Smith elliot at townx.org
Wed Jul 16 21:17:07 BST 2008


David Goodwin wrote:
>>
>> Just wrote a long REST-centric response :) A bit rambling, mind.
>>
>
> Never fear :-) I like to ramble.
>
> Various other replies are also there.....
>
>
> I'm a little concerned that one guy reported issues with .Net <-> PHP 
> via SOAP; I was hoping/assuming that a standardised protocol would 
> _just_ work. Anyone have any experience with .NET to PHP SOAP?
I've not used .NET. Ever. I think I once installed it and wrote one 
dynamic page (ASP.NET), then thought better of it.

Although SOAP is supposed to be a standard, there are bound to be 
issues. What complicates using SOAP is the fact that SOAP is so 
complicated you typically use client libraries which abstract away from 
writing SOAP artefacts: XML envelopes, signatures, headers and so on.

And then you discover there are differences in how the client libraries 
do things. For example, on a recent project, we had issues with the SOAP 
client libraries due to changes to the XML schema specification in 2001 
(very old server SOAP implementation). Because we weren't writing the 
XML ourselves but using an object API, this was pretty hard to debug, as 
the client library was doing all the low-level stuff. I think if you 
were writing the client requests by hand, the SOAP standard does roughly 
what you want; but the client library implementations may do things 
slightly differently.

The nice thing about REST is that the client has to send fairly simple 
HTTP requests, so there's less need to use an abstraction (beyond an 
HTTP abstraction layer) and less possibility of implementation 
differences. For example, a query for a resource can just be a GET to 
http://library.com/items/112131, with no need to construct an XML 
request body. So the "protocol" itself is lean and doesn't get in the 
way as much as it does with SOAP.

Elliot

>
>
> David.
>


-- 
Elliot Smith
http://townx.org/




More information about the Phpwm mailing list