Related Entries

Handling attachments in SOAP

« Oracle with C#
» Linux on TV

Web services notes

Trinetre raises some interesting observations about XML-RPC and web services.

Srijith asks: Why not a simple POST as a client?, for example, for Weblogs.com ping. I started typing this comment in his page - it became slightly long that I thought I’ll post it here.

XML-RPC (and SOAP) try to make a common vocabulary for passing data back and forth. You can define variable name, variable type, value etc. This particular example of pings doesn’t really need all that, so it is not that entertaining.

However, consider another example - a bank that accepts a credit-card and authorizes it over the web. If you want to make use of their service from your site, you can either try HTTP calls from server side to their forms; or do a redirect to their page and back.

With XML-RPC or SOAP enabled service, you don’t need to worry about the silly details about how their form is designed. With modern day IDE’s, you can easily generate a stub that works as a proxy to the original service, thereby freeing up _some_ time for you to focus on your business.

Personally, I believe that while this is certainly useful and a time saver, it is way too much hyped. Form automation is probably easier than web services clients for a Perl::LWP guru.

There are some other advantages I can think of:

1) If you want to process multiple parts of a form with different actions, you can do that with simple client side JS XML-RPC libraries.

And the best:

2) You are free to build different clients; not only Web Pages as UIs for your logic available as services. Believe me, this encourages some discipline with web programmers to move towards Model-View-Controller paradigm.

For example: Any script you drop in Zope is automatically XML-RPC enabled. I recently made a data analysis tool that consisted of small VBA scripts in MS-Office; they get the data from XML-RPC services that talk to enterprise databases. The whole thing consisted of small simple building blocks.

Srijith: “The most disturbing part of the whole Weblogs.com XML-RPC specs is that it does not even allow a change in the order of parameters passed!” I agree - that is really bad! I would’ve imagined they should know how to parse it better, especially since they ask for parameter names too.

Note to self: Read REST Wiki.

  1. I understand and agree with your reasoning behind the usefullness of XML-RPC. What I do not understand is the reason behind the use of XML-RPC to do something as simple as what is being done at Weblogs.com

    You are passing just two parameters and even for a LWP novice, it should not be a difficult job. Take any HTTP POST example and change the URL details.

    XML-RPC is useful and needed but using it for services like blo.gs, weblogs.com and rest is an overkill.

    Posted by: Srijith on September 8, 2003 10:53 AM
  2. Yup - I agree on your point about complicating things unnecessarily. May be they thought it will all fit in well with blog tool authors since Blogger already had an XML-RPC API?

    Posted by: Babu on September 8, 2003 12:55 PM
//-->