users@jaxb.java.net

Re: Order of xml elements in generated schema

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 30 Jul 2007 12:35:26 -0700

vr.sundar wrote:
> Hi,
>
> I am generating an xml schema from annotated java classes through the
> schemagen ant task. The generated schema has the elements of any tag
> in xs:sequence. I did not specify XmlAccessorOrder anywhere (which I
> guess means it is XmlAccessOrder.UNDEFINED). But the elements are
> still in alphabetical order in the generated schema. Is there a way to
> get the elements to be in xs:all instead of xs:sequence? Am I missing
> something or doing something wrong?

You need to specify @XmlType(propOrder={}) to get <xs:all> See the javadoc.



-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com