title: BlazeDS and ArrayList of custom objects
body: <p>I'm using BlazeDS to connect Flex with Java.  I'm having trouble passing ArrayLists of custom objects from Flex to java.  </p>
  
  <p>I have two objects, one is called Category, the other Section.  A Category has an ArrayList of Section objects.  I can send an ArrayList of Category objects back and forth between Flex and Java, the problem is when I try to access the sections ArrayList of a Category object that has been returned to Java from Flex, I get the following error:</p>
  
  <pre><code>flex.messaging.MessageException: java.lang.ClassCastException : flex.messaging.io.amf.ASObject
  </code></pre>
  
  <p>For some reason I'm getting an ArrayList of ASObjects rather than my Section objects. I tried looking up how to explicitly type arrays in actionscript, but the only thing I could find was using a Vector object, which BlazeDS does not support. Is it possible to pass an ArrayList of Section objects within an ArrayList of Category objects, or do I have to find another way around?</p>