cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Chaffee" <jchaf...@ebates.com>
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
service.

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.  

Jason

-----Original Message-----
From: Jason Chaffee [mailto:jchaffee@ebates.com] 
Sent: Thursday, December 02, 2010 1:13 PM
To: Daniel Kulp; users@cxf.apache.org
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 [mailto:dkulp@apache.org] 
Sent: Thursday, December 02, 2010 8:56 AM
To: users@cxf.apache.org
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 
hands.  

Dan



> 
> -----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.

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message