axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabrice Depoux" <>
Subject Serialization of a derivated sequence
Date Thu, 02 Jan 2003 15:35:28 GMT
I'm using Axis 1.0 and I have a trouble with the serialization of  a
derivated sequence.

I'm working with a schema equivalent to the following one:
<sequence name="A">
    <element name="AA"/>
    <element name="AB"/>
<sequence name="B">
        <extension base="A">
                <element name="BB"/>

When the class B is serialized with Axis, the sequence's order of the
subclass is not respected and the XML result is invalid according to the
Xschema (I've got something like <B><BB/><AB/><AA/></B> instead

After analysis, the BeanSerializer associated to the class B uses the
java.bean.Introspector for retrieving the list of attributes of the
superclass A (see the method TypeDesc.getPropertyDescriptor()). So the order
of the fields does not necessary correspond to the order of the sequence. It
will be better to use the TypeDescriptor defined in the superclass A which
contains the order of the XML sequence.

Do I have made something wrong or miss something in the definition of my
Do you have any ideas how I could solve this problem?

Thanks in advance,

View raw message