Archive for the ‘Flash/Flex/Actionscript 3’ Category

BlazeDS Not Serializing Objects AS3/Flex Remoting FIXED

Friday, June 24th, 2011

So I ran into a little snag today, and I’m sure this isn’t the only post out there related to this issue, but if one of my two readers lives under a rock, this might help…

Short Story: Make sure you have an import of the object you want to serialize as, within the class that receives the data. To do this create a marker variable (aka: var vo:SomeVO;) somewhere in the class, so that cmd+shift+O does not remove your import.

Long Story: I was just finishing up refactoring a Command class in Cairngorm by moving all of my data manipulation into it’s own class, when I realized that the objects being returned through BlazeDS were no longer serialized. So I checked my VO on the Flex side to be sure I setup the RemoteClass(alias…), and that was all good. Then I checked the Java side of things to be sure it was all good. Then I started to scratch my head and wonder what in the world I did wrong. Well it turns out, with a little bit of magic, the mystery was solved (read the Short Story above).

k thx bye