Hi, in order to finish Small Messages implementation I need some guidance. Hope you guys could throw some light on this.
When turning small messages on, BlazeDS send serialized version of some messages. For example the most important is "*DSK*" (the registerClassAlias for *AcknowledgeMessageExt.as*), in this case we get a type code *168* in " *readObject*" method from *AMFBinaryData*. We can get as well *169* and *161* codes, don't know if there's more since I couldn't find any documentation about this. So in *readValueObject*() I introduced a new case *EXTERNALIZED_OBJECT* (that is a constant with 168 value) Inside we need to deal with the deserialization of the *AcknowledgeMessageExt* message (the *DSK*). This kind of messages like the rest implements all *IExternalizable* methods (*readExternal*, *writeExternal*), that receive a *IDataInput* and *IDataOutput* respectively. I get all this code of messages from Flex RPC compile correctly . Here I have a doubt: ** When I have a ByteArray param here it should be BinaryData or AMFBinaryData in Royale?* (I suppose the second, but can't ensure it) Finally the main problem...How can I deserialize the DSK object that comes vía AMF 1.-* I'm pretty sure that AMFBinaryData must implement IDataInput and IDataOutput since is the object I suppose I must to pass to readExternal or writeExternal right?* 2.- In *readValueObject*(), case *EXTERNALIZED_OBJECT* I tried to do something like: *var dsk: AcknowledgeMessageExt = new AcknowledgeMessageExt()* *dsk.readExternal (this);* *value = dsk;* this is not working, if not we'll be done ;) But as I don't know how flash IExternalizable works under the hood, I don't know how to deal with this in Royale. I suppose that Flash Player manages the readExternal and writeExternal methods under the hood, right? but in Royale I suppose we need to call it ourselves. Maybe the IExternalizable, IDataOutput and IDataInput are not right as I write those. Notice that the last two doesn't have all the methods in Flash. I write only the required ones. I'll write the rest as we get the current problem solved. As I said, all messages has the message methods for readExternal and writeExternal compile in royale, so I think we are so close to get this implementation working hopefully with some help for your part to finally get the final pieces of this puzzle solved :) Thanks in advance Carlos -- Carlos Rovira http://about.me/carlosrovira
