users@jersey.java.net

Resource class with JAXB and _at_XmlType(propOrder=...)

From: MS <da_bus_at_arcor.de>
Date: Sat, 08 Aug 2009 13:49:44 +0200

Hi,

I am posting an XML-resource to a Jersey resource class that uses JAXB
to unmarshal XML to a Java object.

The method from the resource class looks like this:

    @POST
    @Consumes("application/xml")
    public Response doSomething( MyJaxbClass myJaxbClass ){
        ...
    }

and the class with JAXB annotations like this:
   
    @XmlType(propOrder = {"id", "name"})
    @XmlRootElement
    public class DocumentServiceProvider{
       ...
    }

The unmarshalling works correctly, but it does not care about the order
of the XML elements. Has anyone an idea what I am doing wrong?

Thanks!