Flex SDK with Actionscript 3 using webservices
Coming back to coding Actionscript after a while I noticed that you got to fix more and more bugs over the years of Flash development. Yes there were many limitations with AS1.0 and AS2.0 using Macromedia Flash, MX and CS, but the recent movements in Adobe’s labs make me wonder where they want to go. For example using their mx.rpc packages with flex and AS3.0 gives me a lot of headache. Gladly I stumbled upon the “YAAB – Yet Another Actionscript Blog” and found this article about Remoting with BlazeDS from plain vanilla Actionscript 3 class. He summed up all the workarounds and problems you get when trying to work with Remoting from AS3.0.
At first I tried using Axis2 for remoting. But the recent versions of Axis2 Service Archive Wizard – Eclipse Plug-in and Axis2 Code Generator Wizard – Eclipse Plug-in are buggy at times when you want to achieve very simple tasks. To generate a services.xml and .wsdl file seems to work but stuffing em into some .aar package with the Archive Plug-in results a faulty Service Archive. So there was almost no possibility to change the session scope of the werbservice or access and register remote classes. Switching to BlazeDS gave some advantages. Now I didn’t have to build some .aar package because it just interprets my .class and .jar files. All I had to do now was looking for the right AMFChannel and now I was able to transfer complex Objects in both ways. I just wish I had found the YAAB blog entry a few days earlier.