XML-RPC

2001.08.30

I played a little with XML-RPC today, just to kick the tires. I've talked about it off and on, but I hadn't really used it for anything. As a bit of recreation I created a genius web service which I'm sure will be as popular as anything in the Microsoft .NET initiative.

That's right: You can now use XML-RPC to request a random cool thing from my website.

While I let that soak in, let me explain that XML-RPC is a technology for doing remote procedure calls using XML payloads over the standard HTTP protocol. It allows you to write basic APIs for services on a website and exchange data more robustly than scraping through HTML, hoping to get the answer you're looking for. A developer can define a service, and client software can then use that API to access the service, all using a simple XML-based specification. It's the precursor to the Simple Object Access Protocol that will be at the heart of Microsoft's .NET.

The main benefit of XML-RPC and SOAP is that they enable services to communicate across platforms and languages. The main benefit of XML-RPC over SOAP is that it's a lot simpler to deal with.

There are many good resources for learning about XML-RPC, including the XML-RPC website and this article by Edd Dumbill, the primary author of PHP XMLRPC, the library I'm using to provide this much-needed service.

If you've read this far, you're probably burning up to know how to get some random coolness happening for yourself. The details are below.


Host: www.semanticnoise.com
Port: 80
URI: /xmlrpc/server.php

site.getRandomCool

string site.getRandomCool() - Returns a random cool thing from the site database


In case it's not obvious, this is a glorified "Hello, world!" piece of code. Should I find anything else I'd like to make available via XML-RPC, I'll add it here. I have a few ideas, but they all seem like a lot of work...

If you decide to try hooking up with my cool, please let me know so I can be impressed with you.