« Return to Thread: ArrayCollection items deserializing as type Object
by philmk
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View in Thread
Ah, it’s typical that you find
the solution after you’ve posted the question!
I’ve discovered that the problem
was that using the “private static const” to register the class alias worked
most of the time because the Class object had been referenced somehow before
the call was made. In this case, the alias didn’t get registered until after
the server request was made, and so, the Flash runtime didn’t know how to map
the response object.
After moving this line of code
to another location, the deserialization worked fine!
Thanks for listening!! ;-)
Philip McKeown
From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Philip
McKeown
Sent: 23 September 2008 11:17
To: fluorine@...
Subject: [Fluorine] ArrayCollection items deserializing as type Object
Hi All,
This is my first time posting, but I’ve looked through the
online forum to try to find a similar issue, and couldn’t. This is probably a
newbie issue, so hopefully someone has come across this before…
I have a .Net service which returns a custom complex object.
This object has a number of generic List<> properties, which are lists of
other custom objects.
In Flex I have a set of Value Objects to match each of the
objects returned in the service response. Each Value Object contains a line of
code to register the class alias, e.g.:
private static const ALIAS_REMOTE:*
= registerClassAlias("ServerObjectName", ClientValueObject);
When the call to my service returns to the Flex Client, each
object in the object graph gets deserialized to the correct type, except for
one particular class which is contained in one of the ArrayCollections, and my
problem is I can’t see why. The object is declared and registered the same as
everything else, the client-side object code is generated and I’ve
double-checked for typo’s. I’ve also tried registering the class mappings on
the server.
There is nothing special, or different about this class (that
I can see). I’ve also tried logging the server DEBUG events, which have not
shown any issues. Is there anything else I can check or try?
Sorry if this sounds a bit confusing, I’m trying to keep the
post short!
Thanks,
Philip McKeown
« Return to Thread: ArrayCollection items deserializing as type Object
| Free embeddable forum powered by Nabble | Forum Help |