Custom Radio UserLand Clients?

(Back in 2003 I ran a moderately popular tech blog on the Radio UserLand platform. This is an archived version of a post from that blog. You can view an index of all the archived posts.)

Tuesday, 4 November 2003

Radio is a reasonably nifty weblog client, sporting an easy-to-use, web-based content management tool, a workable server-based news aggregator and a fairly robust weblog hosting infrastructure for USD$3.33 a month.

Things I find annoying about Radio include the fact that it won't run on a Unix-based OS (although there are reports of folks who've got the Windows version up and running under Wine on Linux), it's got a fairly large footprint, and it uses a relatively cumbersome and under-documented scripting framework.

All in all, the biggest appeal of Radio Userland to me is that I can get quick, easy and generally adequate weblog hosting for monthly cost less than a trip to Starbucks. If only I could continue to use the hosting service and replace the Windows-based client--I'd be happy to generate the weblog HTML via some homegrown software and simply upload the content via FTP or SCP.

Well, it's not quite as easy as FTP, but after poking around a bit, I've figured out how to "manually" update a Radio hosted site, or more generally, any of a number of servers that supports the xmlStorageSystem XML-RPC protocol.

Here's a relatively crude but functional example using HttpClient.

First, the basic framework for processing a request and it's response. This method takes a request "body" and returns the response. Typically both the request and the response will be XML-RPC documents.

String processRequest(String body) throws IOException, HttpException {
    PostMethod method = new PostMethod();
    method.setRequestHeader("Content-type","text/xml");
    method.setRequestBody(body);
    method.setPath("/RPC2");
    method.setRequestContentLength(body.length());

    HttpClient client = new HttpClient();

    HostConfiguration host = new HostConfiguration();
    host.setHost("radio.xmlstoragesystem.com");

    client.executeMethod(host,method);

    return method.getResponseBodyAsString();
}

Typically we pass an xmlStorageSystem request to this method as the String parameter. Here's one simple example, a sort of "status" query:

<?xml version="1.0"?>
<methodCall>
  <methodName>xmlStorageSystem.getServerCapabilities</methodName>
  <params>
    <param><value><!-- your radio user number, e.g., mine is "122027" --></value></param>
    <param><value><!-- the md5 hash of your radio password as ASCII bytes --></value></param>
  </params>
</methodCall>

To create or update a file (or files), we use saveMultipleFiles, for example:

<?xml version="1.0"?>
<methodCall>
  <methodName>xmlStorageSystem.saveMultipleFiles</methodName>
  <params>
    <param><value><!-- your radio user number, e.g., mine is "122027" --></value></param>
    <param><value><!-- the md5 hash of your radio password as ASCII bytes --></value></param>
    <param>
      <value>
        <array>
          <data><value>/rpctest/test.html</value></data> <!-- location of file -->
        </array>
      </value>
    </param>
    <param>
      <value>
        <array>
          <data><value>Hello World!</value></data> <!-- contents of file -->
        </array>
      </value>
    </param>
  </params>
</methodCall>

To delete a file (or files), we use deleteMultipleFiles, for example:

<?xml version="1.0"?>
<methodCall>
  <methodName>xmlStorageSystem.saveMultipleFiles</methodName>
  <params>
    <param><value><!-- your radio user number, e.g., mine is "122027" --></value></param>
    <param><value><!-- the md5 hash of your radio password as ASCII bytes --></value></param>
    <param>
      <value>
        <array>
          <data><value>/rpctest/test.html</value></data> <!-- location of file -->
        </array>
      </value>
    </param>
  </params>
</methodCall>

etc.

See Dave Winer's writeup for more procedures, details and examples.

Now that I know how to manipulate my radio.weblogs.com site without using the Radio client, I'm tempted to roll my own weblogging software, if only so I don't have to keep a Windows box around to support my blog. As I mentioned above, there are a number of servers that support the xmlStorageSystem protocol. Anyone know of any non-Radio clients for xmlStorageSystem? At minimum, something that syncs an arbitrary local directory with a remove xmlStorageSystem server should be easy enough to implement, which would allow anything that you can "publish" locally to be used as a client to a Community Server implementation.


This page was generated at 4:16 PM on 26 Feb 2018.
Copyright © 1999 - 2018 Rodney Waldhoff.