I've been connecting our Flex app to Web Services written in JBoss for the first time and noticed some odd things happening when the web service sends back an array.
This problem basically goes away if you change the operation tag's resultFormat attribute from "object" to "e4x". Can anyone explain this? Here's the soap message that is coming back: <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns2:fetchLookupsResponse xmlns:ns2="http://session.misura.triggersoft.com/"> <return> <functions> <description>HR</description> <functionId>1</functionId> </functions> <functions> <description>Finance</description> <functionId>2</functionId> </functions> <functions> <description>IT</description> <functionId>3</functionId> </functions> <grades> <description>G01</description> <gradeId>1</gradeId> </grades> <grades> <description>G02</description> <gradeId>2</gradeId> </grades> <grades> <description>G03</description> <gradeId>3</gradeId> </grades> </return> </ns2:fetchLookupsResponse> </env:Body> </env:Envelope> According to JBoss, this is how lists are sent over soap. [shrug] When the operation is defined as having a resultFormat of "object", the structure of the ResultEvent is as follows: event:ResultEvent - result:ObjectProxy - return:ObjectProxy - functions:ArrayCollection [0] ComplexString - value = "HR" [1] ComplexString - value = "1" [2] ArrayCollection [0] ComplexString - Value = "Finance" [1] ComplexString - Value = "2" [3] ArrayCollection [0] ComplexString - Value = "IT" [1] ComplexString - Value = "3" - grades:ArrayCollection [0] ComplexString [1] ComplexString [2] ArrayCollection [3] ArrayCollection As you can see, the first two elements of the array should really be sub-elements. However, when I change the resultFormat attribute from "object" to "e4x" the output is as follows: event:ResultEvent - result: XMLList [0]:XML - ns2:fetchLookupsResponse - return - functions - description "HR" - functionId "1" - functions - description "Finance" - functionId "2" - functions - description "IT" - functionId "3" - grades ... Can anyone explain why the object version behaves so strangely? Cheers, David.

