views:

1346

answers:

2

I am getting this error during serialization:

RangeError: Error #2006: The supplied index is out of bounds. The error occurs in AbstractMessage.as when it attempts to read input of timestamp.

After that my fault handler gets this error:

faultCode:Server.Acknowledge.Failed faultString:'Didn't receive an acknowledge message' faultDetail:'Was expecting mx.messaging.messages.AcknowledgeMessage, but received null'

It appears to be happening as a result of an ArrayCollection coming back from the server.

Is it necessary to create custom classes to handle serialization of ArrayCollections with custom objects as shown here?

I've also followed the serialization recommendations here with no luck.

Thanks for your help!

A: 

The solution was correcting a mistake in writeExternal on the Java side. I was being very careful about the order of serialization but was writing an int as an object using writeObject. This will cause errors in completely unrelated code on the client side after it tries to readInt.

Brandon
A: 

Hey Brandon, thanks for sharing your experiences. Not exact same but I also have kinda same problem with my FMS server SharedObject data..! It was also having a RangeError after updating the SO data. Then after seeing your part of solution, I hve re-study the Flex code and found a type cast change of the SO object is happening somewhere. I fix that, and no RangeError again! Cool! thanks again! ;)

Santanu.K