cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Chaffee" <>
Subject RE: jaxb and namespaces
Date Fri, 03 Dec 2010 01:04:07 GMT
BTW, I found a workaround for not having it being displayed for every

I inject the map that is based on path and has a list of URI's.  In my
provider I check and get the correct list of URI's and pass them into my
custom NamespacePrefixMapper in the createMarshaler() method.

Very cumbersome.  Not fond of it, but it does the trick.  


-----Original Message-----
From: Jason Chaffee [] 
Sent: Thursday, December 02, 2010 1:13 PM
To: Daniel Kulp;
Subject: RE: jaxb and namespaces

Yes.  My clumsy comment was really directed at JAXB and not CXF.

JAXB's lack of support for interfaces is another big one, IMO.

-----Original Message-----
From: Daniel Kulp [] 
Sent: Thursday, December 02, 2010 8:56 AM
Cc: Jason Chaffee
Subject: Re: jaxb and namespaces

On Thursday 02 December 2010 12:31:51 am Jason Chaffee 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.

Yea.  This is an issue with JAXB.   :-(   

I wish JAXB had better namespace control things, but that's kind of out
of our 


> -----Original Message-----
> From: Jason Chaffee []
> Sent: Wed 12/1/2010 8:49 PM
> To:;
> 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
> Jason
> -----Original Message-----
> From: Jason Chaffee []
> Sent: Wed 12/1/2010 5:02 PM
> To:
> 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
> 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
> haven't had any luck so far.
> Thanks.

Daniel Kulp

View raw message