You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Brad O'Hearne <br...@neurofire.com> on 2008/04/03 20:57:08 UTC

Removing namespaces on serialized responses

Hello,

I am using CXF RESTful services configured in Spring, using JAXB. I am  
having some namespace conflicts between my client and server, and I  
was wondering if (for the time being) there was a way to configure CXF/ 
JAXB not to write a namespace into the serialized object that is  
returned from a service method. Does anyone know how to do this and  
maybe can post a snippet?

Thanks,

Brad

Re: Removing namespaces on serialized responses

Posted by Daniel Kulp <dk...@apache.org>.

Brad,

Are you using the older http binding or the newer JAX-RS stuff?

If using the older stuff, you probably could get it to work by writing an 
interceptor that would wrap the XmlStreamWriter with one that would 
strip off any namespace stuff.  It would be a little bit of work, but 
not too bad.

I have no idea with the new jax-rs stuff.

Dan


On Thursday 03 April 2008, Brad O'Hearne wrote:
> Hello,
>
> I am using CXF RESTful services configured in Spring, using JAXB. I am
> having some namespace conflicts between my client and server, and I
> was wondering if (for the time being) there was a way to configure
> CXF/ JAXB not to write a namespace into the serialized object that is
> returned from a service method. Does anyone know how to do this and
> maybe can post a snippet?
>
> Thanks,
>
> Brad



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog