Hi Ben,

We are using the 2.0.1 version.

I have just discovered that this problem only occurs when using
collections of objects that are typed to a superclass of the objects.

For instance, I have a class MediaItem. My 2 concrete subclasses are
CD and DVD. A CD has a Tracks property and a DVD has a Actors
property. When I send over a MediaItem array, it is correctly
converted to an ArrayCollection but the Tracks and the Actors
collections in the subclasses of MediaItem are ObjectProxy instances.

To solve this, let's move the Tracks property of the CD class to the
MediaItem superclass. The Tracks property is then also converted to an
ArrayCollection.

Seems like a bug in the deserialisation of the data, what do you and
others think? Should I file a bug and where?

regards,
Christophe

--- In flexcoders@yahoogroups.com, "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> Are you using 2.0.1? There were a handful of WebService
> serialization/deserialization issues resolved, some of which were
> specific to .NET services.
> 
> You might also want to check out Darron Schall's ObjectTranslator
> class: http://www.darronschall.com/weblog/archives/000247.cfm.
> 
> HTH,
> Ben
> 
> 
> --- In flexcoders@yahoogroups.com, "herrodius" <lists@> wrote:
> >
> > Hi all,
> > 
> > we are currently creating a series of webservices to talk to our .Net
> > backend system. We are sending over nested value objects which
> > sometimes contain nested arrays of objects. When we receive an array
> > in Flex, it is mapped to an ArrayCollection. We then have to do the
> > actual object mapping manually, which is the way to go I suppose.
> > 
> > But when we send over nested arrays, the first array is converted to
> > an ArrayCollection successfully but every other (deeper) array is
> > converted to an ObjectProxy in which there is an ArrayCollection that
> > contains the actual data of the Array. There seems to be an extra
> > object/level that gets created.
> > 
> > An example (debugger output):
> > 
> > result (ObjectProxy)
> > - Components (ArrayCollection)
> > -- [0] (ObjectProxy)
> > -- [1] (ObjectProxy)
> > --- Answers (ObjectProxy, should be ArrayCollection)
> > ---- GapAnswer (ArrayCollection, does not exist in the original object
> > and should not be here)
> > ----- [0]
> > ----- [1]
> > 
> > As you can see there is an "Answers" property in the second item of
> > the "Components" ArrayCollection. This should be an ArrayCollection
> > instead of an ObjectProxy and the "GapAnswer" property in it should
> > not even exist. (GapAnswer is the type of the .Net Answers array ->
> > GapAnswer[] Answers)
> > 
> > Has anyone run into this before? Could this be a bug in the
> > deserialization of the objects?
> > 
> > regards,
> > Christophe
> >
>


Reply via email to