www.rinner.st

the blog/wiki/website/homepage/internetpräsenz of Stefan Rinner

lingo-xml-rpc

This is xml-rpc client written in Lingo. It has been tested against the getstate function at betty.userland.com but is still an alpha release.

A server version - useful for macromedias Multiuser Server or standalone projectors is planned but hasn't been implemented up to now.

The client makes extensive use of Andrew White's XML-Parser (andywATcathode.co.uk) which proved as extremely useful and reliable alternative to macromedias XML-Parser-Xtra (http://www.cathode.co.uk/ucon99/)

Example: http://www.rinner.st/misc/lingoXmlRpc.dcr Source: http://www.rinner.st/misc/lingoXmlRpc.dir (director 8.5) main parent-script: http://www.rinner.st/misc/lingoXmlRpc.html (for visitors not owning director)

###HOWTO The client's functionality is encapsulated within a parentscript. To use it it has to get instantiated first.

gINrpc = script("xml.rpc").new()

After the instantionation has been accomplished the handler remotecall() can be invoked. The handler takes 5 arguments: first the name of the server to connect to, second the name of the procedure, a linear-list contaning the parameters (linear lists within this list will be transformed to an array, property lists become a struct), the fourth parameter is the callback handler and the fifth argument defines the callback handlers instance.

The last two arguments are optional - if the fifth argument is undefined a moviescript handler will be called, if no handler is defined the result will be printed to the message-window.

gINrpc.remotecall("http://betty.userland.com/RPC2", "examples.getstatename", [41])