Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

What is the benefit of XML-RPC over plain XML?

My company has been using XML-RPC for a while, but lately I'm wondering what the benefit is of XML-RPC compared to plain XML. Firstly, it's horrible "obese", consider:

<struct>
    <member>
        <name>ROOM_ID</name>
        <value>
            <int>1</int>
        </value>
    </member>

    <member>
        <name>CODE</name>
        <value>
            <string>MR-101</string>
        </value>
    </member>

    <member>
        <name>NAME</name>
        <value>
            <string>Math Room</string>
        </value>
    </member>

    <member>
        <name>CAPACITY</name>
        <value>
            <int>30</int>
        </value>
    </member>
</struct>

Compared to this:

<room><ROOM_ID>1</ROOM_ID><CODE>MR-101</CODE>
<NAME>Math Room</NAME><CAPACITY>30</CAPACITY></room>

Or even this:

<room ROOM_ID=1 CODE=MR-101 NAME=”Math Room” CAPACITY=30 />

Secondly, XML-RPC seems fairly widespread but not quite ubiquitous and I'm not that impressed with the support for it in C++ and PHP. I've had problems with all the libraries that I tried in both languages.

Thirdly, it seems to me that I could make remote procedure calls with plain XML as easily as with XML-RPC. {(9/9/2009): Every language has libraries for serialising language-level objects into XML. Both XML and XML-RPC require application-level schemas to be defined, for example, how the fields should be spelt, but neither needs any additional schema to be defined. Many people make RPC calls with plain XML.}

So what is the value-add of XML-RPC?

Answer*

Draft saved
Draft discarded
Cancel
1
  • With plain XML, there is no need to write code to generate and parse XML documents. I easily found links to libraries that already do this for C# and PHP in exactly the same way libraries do this for XmlRpc. If I had code that did XML then I wouldn't be interested in a multi-wire-protocol API. Commented Sep 8, 2009 at 1:30

lang-xml