Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between XML-RPC and SOAP?

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.

like image 678
Scott Saad Avatar asked Sep 17 '08 04:09

Scott Saad


People also ask

Is SOAP and RPC same?

(I should note that, technically speaking, SOAP is an example of a Remote Procedural Call, or RPC. RPC is a broad category of approaches for allowing different computers to communicate with each other.

What is the difference between SOAP and XML?

What's the difference between XML and SOAP? XML is a markup language that is used to transfer data between driver hardware, operating systems and applications with little human intervention, while SOAP is a protocol based on XML that is used to communicate between applications through internet.

What is XML-RPC used for?

XML-RPC is a specification that enables communication between WordPress and other systems. It did this by standardizing those communications, using HTTP as the transport mechanism and XML as the encoding mechanism.

What is RPC method in SOAP?

Here is the sample RPC (remote procedure call) using SOAP ( simple object access protocol). A SOAP message is an XML format sent over HTTP to a remote server where the Web service is located. The Web service processes the soap request and returns the value to the client using soap response.


2 Answers

Differences?

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.

XML-RPC does not support named parameters. They must be in correct order. Not sure about SOAP, but think so.

like image 102
Christopher Mahan Avatar answered Oct 11 '22 12:10

Christopher Mahan


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.

like image 28
bmdhacks Avatar answered Oct 11 '22 14:10

bmdhacks