You are not logged in Log in Join
You are here: Home » Members » ike » Flash and Zope communications » Flash-Zope-DiscussionWiki » FlashXMLRPC » wikipage_view

Log in
Name

Password

 
 
FrontPage » FlashCommunicationsMethodology »

FlashXMLRPC

Flash --> XML-RPC --> Zope

Why XML-RPC ?

Flash can natively do a lot of amazing stuff loading simple XML data , and while loading XML from various Zope Datasources is great, but put simply, wrtiing programatic XML parsers can be a lot of work- both for python, or actionscript. More than being an art in itself, writing an XML parser can be a prohibitive amount of work when all you want to do is pass a few data objects between flash and zope for a simple app.

Enter XML-RPC . XML-RPC is a very simple xml specification for making remote procedure calls over http and https , respectively. There have been implimentations of xmlrpc written in almost every Known programming language and enviornment .

Flash, has 2 xmlrpc client libraries that I know of:

-XML-RPC Flash Client Library for ActionScript 2.0 distributed on Sourceforge http://sourceforge.net/projects/xmlrpcflash/

-and this different library: http://members.netmadeira.com/killer/xmlrpc written by Pedro Ornealias.

If you are using Flash 5 or earlier please consider the following problem:

Both of these Libraries suffer from one critical illness- Flash messes up the Content-Type in it's http request headers. This has been an intermittent problem with Flash 4 and 5. Macromedia's official documentation states that there is a contentType directive for use with actionscript sendAndLoad and xmlSendAndLoad objects, but anyone who has worked with it knows that it does not work with any degree of consistency.

If you are required to use Flash 4 or 5 then Flash Remoting is the only method for passing complex data objects between a client and server over http... Remoting requires a ColdFusion? or JRun? backend.

Except, now there is an open solution!!

Using Apache 2, one is able to simply inject a packet header which can force the proper content-type into a request: http://www.zope.org/Members/ike/Flash-Zope/FLASH_xmlrpc_zope/index_html