I'm working with some web services written in JEE with JAX-WS
2.1 on GlassFish v2.
I import the WDSL description with Flex Builder 3 import
utility and it works very well. It's a very nice tool!!!
What I'm trying to do now is a web service that returns an
array of objects. These objects are instances of a hierarchy of
java classes. To make JAX-WS aware of these classes I've used the
@XmlSeeAlso annotation. Now the generated WDSL lets Flex Builder
correctly create the class hierarchy AS definition files. But when
I call the web service function in my Flex application, every
object in the array is instantiated as the base class, losing all
child classes informations.
Is it a bug or a limitation of the automatic generation of
the AS classes? Looking at the SOAP messages exchanged with the
Application Server, the response message correctly carries the
class information (in the xsd:type attribute) of every element in
As example, I have the following java class hierarchy:
class B extends A;
class C extends A;
Flex Builder creates the same class hierarchy from the WDSL
The web service function, defined with "Array of A objects"
return type, returns:
From the web service application: [ B, A, C, C, A, B, B]
In the Flex application: [A, A, A, A, A, A, A]