cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: jaxb and namespaces
Date Thu, 02 Dec 2010 10:25:19 GMT
Hi Jason

You might want to try setting an outTransformElements property either on the
default or your custom provider, and configure it to ignore certain
namespaces. If it does not help then registering a custom XMlStreamWriter
might do

cheers, Sergey

On Thu, Dec 2, 2010 at 5:31 AM, Jason Chaffee <jchaffee@ebates.com> wrote:

> 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:jchaffee@ebates.com]
> Sent: Wed 12/1/2010 8:49 PM
> To: users@cxf.apache.org; users@cxf.apache.org
> 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:jchaffee@ebates.com]
> Sent: Wed 12/1/2010 5:02 PM
> To: users@cxf.apache.org
> 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.
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message