axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Ruby" <ru...@us.ibm.com>
Subject BeanSerializer.sortPropertyDescriptors bug?
Date Sat, 22 Dec 2001 18:21:26 GMT
>From BeanSerializer.java:

    /**
     * This method attempts to sort the property descriptors to match the
     * order defined in the class.  This is necessary to support
     * xsd:sequence processing, which means that the serialized order of
     * properties must match the xml element order.  (This method assumes that the
     * order of the set methods matches the xml element order...the emitter
     * will always order the set methods according to the xml order.)
     */

Unfortunately, I know of no way to get the order in which set methods are
defined in a class file.  In particular,
http://java.sun.com/j2se/1.3/docs/api/java/lang/Class.html#getMethods()
states:

   The elements in the array returned are not sorted and are not in any
   particular order.

One way to solve this is to emit the desired order into the generated WSDD,
and change it so that the deserializer looks there for the sort order.

- Sam Ruby


Mime
View raw message