Hi, I am using Flex 2.0.1 based application to communicate with web services written in Java (JAXWS). System should send requests using complex objects with nested structure and it does it ok.
The problem appears when I have inheritance in the object graph. I have base class X , two derived classes, Y and Z, and two more YA and ZA. x -> y -> ya x -> z -> za X contains common fields such as ID and NAME. Object that I send contains reference to the base class X, but the instance of the objects is YA or ZA. When the request is being sent, I can see only the common properties taken from X, and none of the impl specific fields, although wsdl/schema defines those. When I change the reference type to Y or Z I get the same behavior, so the only way is to define reference to YA and ZA directly, which is not a nice way to go. Now the funny part that the situation is being solved if I move the common fields from x to y and z (duplicate the fields), and leave the X class empty !!! But this approach stops working if I use array of objects, and not only one. Can anyone shed some light of the serialization logic in case of inheritance? One more thing, what is the way Flex deals with inheritance when reference is not the final impl, but to the base class ??? Other WS entities would use techniques such as "xsi:type" definitions in the dispatched XML ... For now I am solving it by adding field to each derived class, with the actual class name, catch it on the server side, and add xsi:type manually, but this way is not the one I would like to stick with .... Thanks in advance. Regards, Dima Gutzeit.

