views:

2262

answers:

6

I've never really understand why a web service implementer would choose one over the other. Is XML-RPC generally found in older systems? Any help in understanding this would be greatly appreciated.

A: 

SOAP allows any XML elements to be sent through, XML-RPC is limited to a predefined number of parameters and is limited in what types they can be.

paxdiablo
+2  A: 

This page has some useful information: http://weblog.masukomi.org/writings/xml-rpc_vs_soap.htm

Long story short: XML-RPC is simpler to learn and use, but SOAP is more powerful.

Thomas
Please can you write answers rather than post links.. What's the point of coming here to be redirected somewhere else?
Rob Cooper
Well, if the links are informative...
Josh Matthews
Well, StackOverflow should be the resource they come to, even if you link and excerpt it is a lot more useful than pasting a link. If you want links, go to Google. Here we want *answers*.
Rob Cooper
Rob, if someone already has a good answer on the web, how do you propose it gets on to stackoverflow? Should the author write it out again word for word to save you the bother of clicking a link? If the link is no good then vote the answer down.
Justicle
Note that I *did* give an answer, though one that summarizes the content of the link. The full answer would be several screens long.
Thomas
A: 

Kate Rhodes has a great essay on the differences at http://weblog.masukomi.org/writings/xml-rpc_vs_soap.htm

Dexter
Please can you write answers rather than post links.. What's the point of coming here to be redirected somewhere else?
Rob Cooper
A: 

I am not sure of the major differences between the two, all I know is that both came out of Redmond & Dave Winer, and SOAP is the newer, preferable option.

AFAIK I think SOAP basically has more header information and attributes, allowing better (more robust) transport of data types - I could be wrong though.

Rob Cooper
+2  A: 

Just to add to the other answers, I would encourage you to look at actual textual representations of SOAP and XML-RPC calls, perhaps by capturing one with Ethereal. The whole, "XML-RPC is simpler" argument doesn't make much sense until you see how incredibly verbose a SOAP call is. Many of the fairly popular web sites out there shy away from SOAP as their API due to just the amount of bandwidth it would consume if people started using it extensively.

bmdhacks
+15  A: 

Differences?

The xml-rpc spec fits on 1 page 6 pages. The SOAP 1.2 spec will cost you a 500 page ream 44 pages.

SOAP is more powerful, and is much preferred by software tool vendors (MSFT .NET, Java Enterprise edition, that sort of things).

SOAP was for a long time (2001-2007ish) seen as the protocol of choice for SOA. xml-rpc not so much. REST is the new SOA darling, although it's not a protocol.

SOAP is more verbose, but more capable.

SOAP is not supported in some of the older stuff. For example, no SOAP libs for classic ASP (that I could find).

SOAP is not well supported in python. XML-RPC has great support in python, in the standard library.

SOAP supports document-level transfer, whereas xml-rpc is more about values transfer, although it can transfer structures such as structs, lists, etc.

xm-rpc is really about program to program language agnostic transfer. It primarily goes over http/https. SOAP messages can go over email as well.

xml-rpc is more unixy. It lets you do things simply, and when you know what you're doing, it's very fast to deploy quality web services, even when using terminal text editors. Doing SOAP that way is a zoo; you really need a good IDE to make it feasible.

Knowing SOAP, though, will look much better on your resume/CV if you're vying for a Fortune 500 IT job.

xml-rpc has some issues with non-ascii character sets.

Edited: Just wanted to add that XML-RPC does not support named parameters. They must be in correct order. Not sure about SOAP, but think so.

Christopher Mahan
For SOAP with Python, there is the ZSI package. It is quite good, but you absolutely need a wsdl.
edomaur