XML-RPC Client Library for ActionScript

Current version: 0.3.1 beta

This is an XML-RPC client implementation for ActionScript 2.0. The usage is very similar to the Flash Remoting for MX 2004 ActionScript 2.0 components, so it should be pretty easy for anyone with Flash Remoting experience to learn to use this library as well. (It shouldn’t be hard for others to learn to use it either — I just wanted to build it to follow a well-established pattern for calling remote methods in ActionScript.)

In addition, this library provides a base class which can be extended to create your own strongly-typed “service” class, which will allow you to have compile-time type checking while using this library — an extra bonus for those of you (like me) who really like compile-time type checking.

You can:

I want this to be useful (and improved upon), so it is being distributed under a pretty open license — the most noteworthy clause is that if you improve the code (of this library specifically), you should pass those improvements back to be included in the core distribution (sort of like LGPL — you don’t have to share any code that isn’t specifically a modification to this library).

Please use the comments section of this page or contact me directly to leave feedback, comments, bug reports, etc. As bugs are fixed, the comments will be updated.

You can leave a comment, or trackback from your own site.

7 Comments so far


  1. William Brown Street is reported to have said:

    links from Technoratimy Del.IcIo.us [IMG RSS] Clazh Themes Demo ยป Just another WordPress weblog Dark Theme Release at iLEMONed Bartelme Design | User Interface and Graphics DesignXML-RPC Client Library for ActionScript, a downloadable code project, from Words, punctuated - by Paul Robertson (http://probertson.com/)Software developer/researcher with background and knowledge in area of computational geometry and/or graph theory algorithms ? Jobs for PhDs at PhDs.org


  2. Markus is reported to have said:

    We’ve found an error in your XML-RPC Client Library. According to the XML-RPC specification the HTTP Content-Type header is text/xml. In your library the Content-Type in the HTTP Header is application/x-www-form-urlencoded. It can be fixed with 1 single line:

    public function serializeRequest(methodName:String, args:Array):XML
    {
    var result:XML = new XML();
    result.ignoreWhite = true;
    result.contentType = “text/xml”; //////// add this line please
    result.xmlDecl = “”;

    regards

    Markus

    [Paul: Thanks for the report Markus! This has been fixed in version .3.1]


  3. Robert is reported to have said:

    I’m having difficulties getting my Flash app to communicate with a Java server. Flash runs fine up until this line myPendingCall.responder = new RelayResponder2(this, sumResult, sumFault);

    I get an error in the compile of type mismatch: found com.probertson.rpc.Relayresponder2 where mx.rpc.Responder is required

    Using a Responder seems to make no difference

    I’m using actionscript 2 in Flash CS3 and followed the step-by-step guide to the letter


  4. [flexcoders] QTP Automation Interface is reported to have said:

    Kramer auto Pingback[…] a server that serves that:). I’ve been able to find http://sourceforge.net/projects/xmlrpcflash and http://probertson.com/projects/xmlrpc/, both for AS 2.0. I am guessing it shouldn’t be hard to make it work with 3.0, but which one would […]


  5. Pankaj Chawla is reported to have said:

    Hi Paul,

    Did you finally port the XML-RPC to AS3.0. If yes, I will be interested to check it out.


  6. Jeff is reported to have said:

    Hi,
    I can’t figure out how to get values into a struct. I’ve made my inplementations of the IXmlRpcStruct interface, so my struct has all the right members and their names, but all the value nodes are empty.

    I have included code along the lines of the following…

    var myStruct:serverInfoStruct = new serverInfoStruct ('value1', 'value2');

    why do my struct members have empty value nodes?

    I’m trying to use this to load openX advertisements into flash, and part of the requirements for thier xmlrpc call is a struct within a struct, much like an array where one of the elements is another array. Is that possible?


  7. XML-RPC vs. Flash-Client - Flashforum is reported to have said:

    Kramer auto Pingback[…] erstellt werden. Ich habe Macromedia Flash MX 2004 mit ActionScript 2.0 benutzt und die sich unter http://probertson.com/projects/xmlrpc/ befindliche XML-RPC-Bibliothek eingebunden. Die Dokumentation dazu findet man unter […]

Add your comment





Comment notes

Please keep comments on topic. Comments that are inappropriate or offensive will be edited or removed.

Paragraphs and line breaks are automatically converted to HTML, and quotation marks are converted to “smart” quotes.

The following XHTML tags can be used: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> . All others will be removed.

Articles by Type

Articles by Topic

Random Reading

Currently...

Subscribe