[
https://issues.apache.org/jira/browse/CXF-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Beryozkin resolved CXF-1291.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.4
TransformFeature can be used to strip namespaces on input and output:
http://cxf.apache.org/docs/transformationfeature.html#TransformationFeature-Springconfiguration
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: https://issues.apache.org/jira/browse/CXF-1291
> 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: http://www.atlassian.com/software/jira