How To Use

PocketXML-RPC is easy to use, it just consists of two objects, the proxy factory and the struct object. The proxy factory is used to create
new client objects for specific endpoints and configurations. e.g.

This creates a new proxy object "proxy" that sends requests to the http://rpc.weblogs.com/RPC2 URL, with "weblogUpdates." prefixing all the methods.
To make an actual call, just call the method on the proxy object with the relevant parameters, e.g.

p.ping "It's Just Code!", "http://www.pocketsoap.com/weblog/"

This will send an XML-RPC request to http://rpc.weblogs.com/RPC2 with a methodName of weblogUpdates.ping with two string parameters "It's Just Code!" and "http://www.pocketsoap.com/weblog/".
The ping method actually returns a struct, which is automatically mapped to our struct object. To access values from the struct, just use the member names as property names, e.g.

set pingRes = p.ping("It's Just Code!", "http://www.pocketsoap.com/weblog/")
' access the message member of the returned struct
msgbox pingRes.message

To send structs, we need to create an instance of the expando struct object first, then it works just as above, it automatically exapands to support whatever properties you set, e.g.

' assume we have a proxy object and we want to send a "sendMessage" method that
' takes a single struct with 3 members message, timestamp and messageId
set myStruct = CreateObject("PocketXMLRPC.Struct")
myStruct.message = "Hello from PocketXML-RPC"
myStruct.timestamp = now
myStruct.messageId = 42
p.sendMessage myStruct

Arrays are also supported, they are mapped to/from arrays of variants, e.g.

myNumbers = array(10,20,30,40,42)
msgbox p.addNumbers (myNumbers)

Nested combinations are also supported, so you can have structs with structs, structs with arrays or arrays of structs, e.g.

Release History

Change to the base64 handling to vastly increase the decoding of base64 data (patch from Jim T Row, thanks Jim!)

Version 1.2, July 22, 2004

Updated to PocketHTTP 1.2.1, various new HTTP features & bug fixes.

expat is now statically linked, only need PocketXMLRPC.dll and PocketHTTP.dll installed to use, all external dependencies are statically compiled in.
Fixes issues where different versions of expat are already loaded into the process.

Added a target for the PocketPC2002 emulator.

Version 1.1, April 26, 2003

Uses PocketHTTP 1.0.1 as its transport, this gets HTTP/1.1 support including chunked encoding, persistent connections and various HTTP related bug fixes.

Version 1.1 RC1, March 2, 2003

Now uses PocketHTTP as its HTTP transport, this gets HTTP/1.1 support including chunked encoding, persistent connections and various HTTP related bug fixes.

Version 1.0.1, December 22, 2002

A crashing bug with handling SSL payloads bigger than 4k on Win32 was fixed. [this doesn't affect the PocketPC version]