2 Replies Latest reply on Nov 18, 2008 7:35 AM by Karl_Sigiscar_1971

    Java - Actionscript objects not serializing

    thehair77
      Hi

      I am having trouble serializing some objects from Java to Flex.

      On 90% of my objects the mapping is fine, but on 10% the mapping can not be found so flex defaults the object type to Object, rather then the ActionScript type that has been defined.

      All of the Java Objects to be mapped have a public no argument constructor, and a getter and setter for each of the properties to be mapped.

      An example of two object, one where the mapping is found and one where it is not:

      package model
      {
      [RemoteClass(alias="org.sdmx.infomodel.keyfamily.impl.DimensionImpl")]
      public class Dimension extends Component
      {
      public var codeList:Codelist;

      }
      }

      This maps ok, in debug mode I can see this is model.Dimension

      package model
      {
      [RemoteClass(alias="org.sdmx.infomodel.keyfamily.impl.FrequencyDimensionImpl")]
      public class FrequencyDimension extends Dimension
      {

      }
      }

      Mapping can not be found, in debug this maps to Object (@MemRef) all of the Objects attributes properties come down the wire, but the Object type is not found.

      The Java class for FrequencyDimension is very simple, all it does is have a default constructor and extend Dimension.

      There does not seem to be any relationship between the classes that don’t map, some extend already mapped classes some do not, sometimes the bad mapping is in objects held in a List, sometimes it isn’t. Actually, there is one relationship, I think of the classes that don't map, they are the latest classes written, and I wonder if this is a compiler issue, not exporting the classes properly?

      Can anyone help?