I have an action script Object that contains an array collection of other object, both objects are reflects of the Java Objects which are the database tables represented as beans, i am using blazeds spring hibernate... the regular configurations for flex RIA with java backend server language, all other objects work perfectly, but this time i needed to get this data from the client side and i do, but when i get into the Set represented as array collection in client side i get this error!!!!! both classes work for other situations, mapping is ok for these classes, i suspect that i need to convert the array collection on the server side, but maybe i did somthing wrong and the server side can figure out the array collection objects type and convert them!!! any one got into this ??
thanks in advance.
I have an action script Object that contains an array collection of other object, both objects are reflects of the Java Objects which are the database tables represented as beans, i am using blazeds spring hibernate... the regular configurations for flex RIA with java backend server language, all other objects work perfectly, but this time i needed to get this data from the client side and i do, but when i get into the Set represented as array collection in client side i get this error!!!!! both classes work for other situations, mapping is ok for these classes, i suspect that i need to convert the array collection on the server side, but maybe i did somthing wrong and the server side can figure out the array collection objects type and convert them!!! any one got into this ??
thanks in advance.
Share asked Sep 13, 2010 at 19:43 seismaelseismael 2271 gold badge6 silver badges18 bronze badges 1- Can you add more detail on the error? What are you trying to cast them into? Most obvious place to start would be, have you set up the remote alias's for your VOs? – Gregor Kiddie Commented Sep 14, 2010 at 9:27
2 Answers
Reset to default 7This could occur if the Remote Classes aren't included in the SWF and this would typically occur if they aren't referenced in your AS code. Working with the Objects in your code will result in the SWF including them in the pilation.
From the documentation: In the ActionScript class, you use the [RemoteClass(alias=" ")] metadata tag to create an ActionScript object that maps directly to the Java object. The ActionScript class to which data is converted must be used or referenced in the MXML file for it to be linked into the SWF file and available at run time. A good way to do this is by casting the result object, as the following example shows:
I was also running through same problem. Can you post ur channel definition. This is purely configuration issue i beleive. There are some attributes in channel definition which prevents the conversion of flex VO to java or any server side VO.
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
This in particular. If this value is set to false, Change it to true and try