0 Replies Latest reply on Feb 28, 2012 6:53 PM by Victor_Jiang

    a very very strange issue on BlazeDS Deserializing

    Victor_Jiang Level 1

      Hi all,

      I run into a very very strange issue on BlazeDS Deserializing. Is there any hint or idea?  Thanks a lot!

       

      Scenario 1:

      Both the browser(firefox or IE) and the midtier (BlazeDS ,java) are on the same machine.

      Actual result:

      Everything works fine.  All the properties in the Flex Object could be mapped to the Java Class

       

      Scenario 2:

      The browser(firefox or IE) and the midtier (BlazeDS ,java) are on the different machine.

      Actual result:

      Sometimes it works fine.

      And most of the time it does not work fine. Only the data in List is mapped correctly. All the values of simple data type such as int are mapped to 0 .

       

       

      Let me simplify the problem.

       

      The objects of Class B is always stored in the ArrayCollection  assocItems of Class A

       

      Flex side:

       

      public class A {

      public var id: int;

      public var  name: String;

      public var assocItems: ArrayCollection=new ArrayCollection();

      }

       

       

      public class B {

      public var id: int;

      public var  assocItems : ArrayCollection=new ArrayCollection();

      }

       

      The id , name in Flex Class A and assocItems in Class B could be  deserialize to correct value .  But the id of Class B is always mapped to 0. This is not correct.

       

      The log level of BlazeDS is configured to Debug. From the log I can see that  each value is passed from Flex side to Java server side correctly.

       

      [BlazeDS][INFO] Channel endpoint my-amf received request.

      [BlazeDS][DEBUG] Deserializing AMF/HTTP request

      Version: 3

      (Message #0 targetURI=null, responseURI=/18)

      (Array #0)

      [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')

       

      However, the Java object does not get the correct value of B.id.

       

      In conclusion,

      1. 1. It’s an issue with only default types
      2. 2. It does not occur every time
      3. 3. It does not occur when the browser(firefox or IE) and the midtier (BlazeDS ,java) are on the same machine

       

      Have you ever run into the similar problems? And what’s your solution?