Expand my Community achievements bar.

[BlazeDS] Flex app Receives untyped Object

Avatar

Former Community Member
I have strange behaviour by blazeDS

I have Object ABS and call service that sends list of ABC
Objects,

in blazeDS log it says correct type but in flex I get
ArrayCollection of Objects even though tey all have correct
properties,

and also it goes even more hairy,

if I do following check :



for each iten im arrayCollection

anitem is ABD // true

but

if I do



var myobj:ABC = (anItem as ABC) // no error is thrown but
after this line myobj is null even though anItem is not null for
sure.



if I do:

var myobj:ABC = ABC(anItem) // class cast exception occures,
saying can't cast from Object into ABC .

1 Reply

Avatar

Level 2
Hi,



Not sure if it will help, but try calling
registerClassAlias("ABS", ABC) before calling into blazeds.

(where ABS is the server data type of the object within the
list and ABC is the client data type)