3 Replies Latest reply on Jun 6, 2007 8:30 AM by Peter Farland

    Array vs. ArrayCollection in mx.rpc.xml.XMLEncoder

    fake666
      hi,

      i have been googling for quite some time now, and spent a few hours step-debugging through the code, yet i can't seem to find an answer to my problem.

      on the server i use spring with xfire so i can use my beans as webservices - which works like a charm; the wsdl is correct, and most of the basic stuff including serialization and deserialization of complex objects works.

      just one complex object is driving me nuts: ArrayCollections are not correctly serialized by flex, meaning: whenever i pass an ArrayCollection as argument to a myWebservice.myOperation.send(), only the first element in the ArrayCollection will be encoded. If i replace the ArrayCollection by ArrayCollection.source as argument to the send() method, all elements contained in the ArrayCollection's Array are encoded correctly.

      This would'nt be such a problem - it's just that i have some own complex objects (DTOs), which contain ArrayCollections of other complex objetcs - and i need the ArrayCollection's binding functionality, so i can't simply replace them by arrays. As i pass the complex object (containing the ArrayCollection as a member property) to the myOperation's send() method, i'm unable to just append .source and call it a day ;(

      maybe someone here can shed some light on this, as i'm really wondering as to what might be the cause of this weird behaviour.

      thanks for reading & in advance for your feedback,

      fake