15 Oct 2001 milkman   » (Journeyer)

Ah, the first post to a diary.

Life is good, school has started and I'm still working about 20 hours a week. Good news is that I get to work on GPL stuff at work. Currently, I'm writing another ASP xmlrpc client/server based off of GPL code from David Carter-Tod, aspxmlrpc.sourcefor ge.net.

The main difference in my version of the xmlrpc client is that you have some sense of error handling contained only within a <methodResponse>. And my interface is a blend of the perl Frontier::Client client I've used before and the php xmlrpc client, and the python implementation of xmlrpc. So, the amalgomation is uh, interesting. I think the fundamental reason for my rewriting portions of their code is that I don't trust ASP(vbscript) to use the correct "type" for a variable. I've seen a few places where the string "3" is an int and it really shouldn't be. So, I've built up a layer of xmlrpc object type things which handle the conversion explictly.

A sample session using the interface.

<-- import xmlrpc-lib somehow -->

client = rpclib.client()

mc = rpclib.methodcall('url','function', [optional parameters])

mc.addParameter([vbscript variable or xmlrpc.value ()])

mr = client.send(mc)

if mr.faultCode() <> 0 then // error condition print mr.faultCode() print mr.faultString() end if

value = mr.value()

Notice that you can use the rpclib.<scalar>() functions to create the xmlrpc entities. So, you can build up the data structures explicitly this way, if you want to, or you can trust it to work by passing in the vbscript datastructure which maps dicts -> structs, array -> array, int - > int, etc. . . to their rpc values.

Yup, so thats what I did last thursday. Also, I'm working on the http://phpunit.sourcef orge.net I've been using PHP's output buffering to make phpunit unitest itself. Also, I'm working on documenting how you implement phpunit testing in a project, this based off what I'm doing at work, so we'll see how that goes.

I think thats a good post, time to start studying for school... oh joy.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!