Hi romanisitua,

I have not worked with Blazeds, I have always used FluorineFx with vb.net so I 
do not know if what I am going to tell you will be useful to you...
- Make sure that event.result returns the ShortType.vlues and StringType.values 
object, which "I understand you do get them right".
- Check that the type class of each of the rows of "values" is recognized and 
mapped (If you launch debug, you can set a breakpoint and expand event.result).
- If it has not recognized and mapped the classes.... Verify that they are 
defined in "com.test.generic.dto.types.*".
- Verify that in App.mxml you have indicated : 
registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
- Could you send me the code of the callback function?

Verify me these points and we continue with the debugging.

Hiedra.

De: romanisi...@yahoo.com <romanisi...@yahoo.com>
Enviado el: martes, 22 de junio de 2021 22:50
Para: users@royale.apache.org
Asunto: Blaze ds does not serialize typed java arrayList to as3 arrayList 
correctly


Hi everyone,

I have the following classes server side

 public class ShortType
 {
   private List<Short> values;

   // values has getter and setter
 }


 public class StringType
 {
   private List<String> values;

   // values has getter and setter
 }


 With their corresponding as3 classes

  import org.apache.royale.collections.ArrayList;

     [RemoteClass(alias="com.test.generic.dto.types.ShortType")]
     [Bindable]
     public class ShortType
    {


       private var _values:ArrayList;





  public function set values(values:ArrayList) : void
       {
              trace(" --- short values list set --- ");

           this._values = values;
       }

       public function get values():ArrayList
       {
           return this._values;
       }

   }


   import org.apache.royale.collections.ArrayList;

     [RemoteClass(alias="com.test.generic.dto.types.StringType")]
     [Bindable]
     public class StringType
    {


       private var _values:ArrayList;





  public function set values(values:ArrayList) : void
       {
              trace(" --- short values list set --- ");

           this._values = values;
       }

       public function get values():ArrayList
       {
           return this._values;
       }

   }


   When trying to access the values arrayList in royale the content of the 
array list is incorrect

   for example if a put short values 14, 100 in the arrayList server side, I 
will get an array list with values (0, 1)

   The samething if I put String vales "Mr", "Mrs" in the arrayList server 
side, I will get an array list with values (0,1)


   Clearly blazeds is not serializing the List<String> and List<Short>.

   Any ideas ? I am using js:RemoteObject to perform the call.

   I tried switching to mx royale but I keep getting compiler errors whenever I 
reference mx royale classes. I tried to follow the example where mx royale 
remote object was used in a jewel app but compiler errors keep coming up.



   Would appreciate help on this. I am pretty stuck at the moment.


Regards,




Reply via email to