XML-RPC for Shockwave

Back


XML-RPC?

XML-RPC is a method for doing remote procedure calls (the RPC part).

When you use a remote procedure call in software that you write, it allows your software to ask some other software to execute some code and give you the results. The request and the return results both go across the network, so you can ask for a remote procedure from software running anywhere on the network.

By standardizing the way that requests and responses are encoded and decoded, we are able to make remote procedure calls very nearly as simple as any other procedure call. The key to doing this is to agree upon a format for the information to be passed from one application to another. This is where XML comes in. XML-RPC is one standard for encoding and decoding procedure calls and their return values.

The really cool thing here is that if you are using one of many common programming language for which someone has already written an XML-RPC translator, you don't have to worry about the XML or the network transfer at all. You pass the remote method native data types, and get the same in return.


The Shockwave Piece

Shockwave movies, created with Macromedia's Director, offer a rich set of programming and interface tools to the developer. Adding remote procedure calls to this set of features is a great way to extend Shockwave usefulness as an interface development tool in a client server/interactive internet environment.


The Files

You can preview or download the following


Credits

I'm indebted to James Spahr for his initial work on this. He created shell of the test movie you see above, and was able to format a request and parse a response from an RPC server. This gave me a great start on implementing the RPC client.

I went on to modify much of what James provided me with, and write the code that translates native lingo data structures into XML and XML into native lingo structures.


License

The lingo xmlRpcLib provided here is released under the Artistic License. You can read more about this at the Artistic licenses page of the perl web site http://www.perl.com/pub/language/misc/Artistic.html.


Limitations

This library only supports the conversion of integers, floats, string, arrays, structs, and nested arrays and structs. Other types will be converted into strings. Error catching is dismal, and the code should be considered early alpha. I'll be working quite a bit on the code in the near future.


Contact

My main reason for releasing this software at such an early stage is that I don't want anyone to have to re-do what I've done. Comments, bug reports and bug fixes are welcome. Please address them to Nathan Young, nathan@ncyoung.com.