Another problem with this solution is that will add the define root namespaces for all xml returned by all services even if those services will never use those namespaces....very clumsy, IMO.
-----Original Message----- From: Jason Chaffee [mailto:[email protected]] Sent: Wed 12/1/2010 8:49 PM To: [email protected]; [email protected] Subject: RE: jaxb and namespaces Found a solution by creating My own XMLProvider that overrides the createMarshaler method and sets the "com.sun.xml.bind.namespacePrefixMapper" on the marshaler. Would have preferred a way to do this with annotations, while clunky, it does work. Jason -----Original Message----- From: Jason Chaffee [mailto:[email protected]] Sent: Wed 12/1/2010 5:02 PM To: [email protected] Subject: jaxb and namespaces I am using jaxrs and I have several namespaces being used in a single service. Currently, all of those namespaces are being output inline in each element. This is adding a lot of characters to the total size of the document. Does anyone know of a way to force namespaces to be defined in the root element? I was looking for a way to force this but haven't had any luck so far. Thanks.
