cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Resolved] (CXF-1291) Create an interceptor to strip XML namespaces....
Date Fri, 27 May 2011 14:32:47 GMT


Sergey Beryozkin resolved CXF-1291.

       Resolution: Fixed
    Fix Version/s: 2.4

TransformFeature can be used to strip namespaces on input and output:

The only limitation there is that one needs to know which namespaces have to be stripped off
- which is reasonable given that for all but oneway requests, the no namespaces response will
get back and will need to wrapped back into missing namespaces.

Still, I'm planning to add a wildcard support.

Another option for OUT payloads only is to register

org.apache.cxf.staxutils.transform.IgnoreNamespacesWriter from a custom interceptor as suggested
by Dan, by getting the current writer and wrapping it with IgnoreNamespacesWriter

> Create an interceptor to strip XML namespaces....
> -------------------------------------------------
>                 Key: CXF-1291
>                 URL:
>             Project: CXF
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0.3
>            Reporter: Daniel Kulp
>            Assignee: Sergey Beryozkin
>             Fix For: 2.4
> A couple of folks on cxf-user have asked for the ability to return XML with all the namespaces
completely stripped out.   
> An "interesting" approach could be to add an interceptor immediately after the StaxOutInterceptor
that would wrapper the  XMLStreamWriter with a writer that would discard all namespace related
events.  We just need the interceptor to be created.   Adding it can be a configuration item
for the user.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message