XML-RPC: Alive, yes; but still kicking?

XML-RPC: Alive, yes; but still kicking?

Posted by Brad Wood
Aug 30, 2008 18:31:00 UTC
I've built and consumed SOAP web services. I've consumed REST web services. It wasn't until a couple days ago I got a chance to consume an XML-RPC web service. I'll readily admit, I'm still a little unsure of the exact differences between the two, but the more I Google, the clearer it is becoming.This is what I've got so far. Please correct me where I am wrong.
  • REST- There is a different URL for each operation, and the query string is used to pass in all arguments. HTTP verb controls what you are doing. GET, POST, DELETE. Results often seem to be in XML, though I'm not sure that is a requirement. Must consume these manually in ColdFusion by making cfhttp requests.
  • SOAP- One URL services many operations. Almost always an HTTP GET. Request and response body are an XML document describing what method to call, and the parameters. XML is pretty verbose, but handles complex parameters easily. ColdFusion makes consuming these easy-peasy pie-in-the-sky. Just point to the WSDL and and away you go. SOAPiness is all handled in the background for you. You can use cfinvoke, createobject, or cfhttp if you want to create the SOAP XML manually.
  • XML-RPC- This seems to be very similar to SOAP, but simpler and older. It also uses a standard format for XML requests and responses. It handles complex arguments nicely too. No apparent support built directly into ColdFusion for creation of XML. In fact, it was very hard to get any information for XML-RPC and ColdFusion. There is an xmlrpc.cfc file out there that will create and read XML-RPC packets, but I had to wade through tons of broken links, and very old posts to find the code. Still has to be called through CFHTTP.
So that's how I see the world for now. Can anyone comment on the current usage of XML-RPC? Why doesn't ColdFusion have any built-in support for it like SOAP. Is it just not used that much? So far, the xmlrpc.cfc code has been working well for me. Thanks to Roger Benningfield for it.

 


TJ Downes

For future reference, the XMLRPC component can be found here: http://www.koders.com/coldfusion/fid6A839C1CD0C030EB7EA0069B8D1276D2F2DF9B33.aspx?s=sort

Koders seems to be pretty stable, so I am guessing its a good place to bookmark

Luke

Heaps of web apps out there support XML-RPC. Eg. Wordpress and Drupal have XML-RPC interfaces so you can eg. integrate it easier with a Flash front end or Flash elements. Pretty nifty although a bit verbose at times...

Brad Wood

@TJ: Thanks for posting that link. That is actually where I finally found the code after just googling "xmlrpc.cfc"

CV

Brad, just used the xmlrpc.cfc to integrate the Oodle.com API. Was a bit of a pain, but I needed to since Oodle is the largest classifieds site on the net.

Justin Scott

The Koders URL appears to be broken. Is there somewhere else this can be downloaded, or can you e-mail a copy to me? Thanks!

Brad Wood

@Justin: I'm away this weekend, but I'll dig up the CFC and post it when I get back home.

Brad Wood

@Justin: I apologize for taking a couple weeks to get around to this. The computer that has those files is currently down for maintenance (needs a new motherboard).

The XML-RPC library I was using is here: http://www.codersrevolution.com/enclosures/xmlrpc.zip I believe credit originally goes to Roger Benningfield (http://admin.support.journurl.com/)

Another XML-RPC implementation that I have NOT used is here: http://www.codersrevolution.com/enclosures/xmlrpc.cfc1.zip Credit for this one goes to Critter Gewlas (http://www.alagad.com/go/blog-entry/the-pain-and-agony-of-xml-rpc-blog-publishing)

Hope this helps.

Site Updates

Entry Comments

Entries Search