Skip to main content

XML-RPC client library using Drakma and CXML

A few weeks ago, I tried using S-XML-RPC for use with a hunchentoot-based web interface to rtorrent. Unfortunately, it comes with a long list of dependencies that are already implemented better by Ediware such as drakma: it can speak HTTPS, connect via proxies, and allows cookies (although I’m not aware of any xml-rpc implementation that supports this (-:).

So I re-implemented s-xml-rpc’s client part to use the libraries that are already available in clbuild, and got a pretty pleasant-to-use library. To simply invoke an xml-rpc method, use:

* (xrpc:call "http://betty.userland.com/RPC2" "examples.getStateName" '(:integer 41))
"South Dakota"

* (xrpc:call "http://time.xmlrpc.com/RPC2" "currentTime.getCurrentTime" ())
#<CXML-RPC::XML-RPC-DATE 20071202T06:56:43>

It’s entirely undocumented right now, and some names (and interfaces) may be subject to change, but I’m making it available now anyway, at my git repository.

The plans for the near future (e.g. next weekend) include a server part based on Hunchentoot, and, um, test cases and documentation. Stay tuned!