Hi Harit,
You can not cast res.getItemAt(0) to User object.
you only use using us:Object = res.getItemAt(0);
I tested already on .NET
Regards,
KietVT
2008/11/1 harit <[EMAIL PROTECTED]>
>
> I have implemented a web service that returns ArrayList (Java) object
> from AXIS + apache tomcat server.
> I have implemented a method for my flex client to manipulate result of
> the WS call.
> Here it is...
>
> public function resEvent(event:ListUsersResultEvent):void
> {
> var res:ArrayCollection = (ArrayCollection)(event.result);
> var us:Object = res.getItemAt(0);
> mx.controls.Alert.show(""+us.password + " " + us.id);
> }
>
> For ref. the java web service on server is returning ArrayList of User
> objects.
> I have User ActionScript class on client too.
>
> Everything's fine except that when I typecast var us:User = (User)
> (res.getItemAt(0)); it gives exceptions.
> Just declaring and assigning by var us:Object = res.getItemAt(0);, I
> am able to access public properties like id, password which are
> essentially belong to User class and not Object class.
>
> Can anyone explain reason behind this? FYI : The above method is
> perfectly working without any compile / runtime error!
>
> Thanks,
> Harit
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---