[BlazeDS] Flex app Receives untyped Object

Avatar

Avatar

levancho

Avatar

levancho

levancho

11-06-2008

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 .

Replies

Avatar

Avatar

anirudhs

Avatar

anirudhs

anirudhs

18-06-2008

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)