You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2009/05/07 14:08:30 UTC

[jira] Commented: (CXF-1089) Rest services String response into a CDATA section.

    [ https://issues.apache.org/jira/browse/CXF-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706810#action_12706810 ] 

Sergey Beryozkin commented on CXF-1089:
---------------------------------------

I've added a support for XMlStreamWriters in JAXB provider, so I believe you can register a basic writer from either a CXF interceptor or JAX-RS request filter which will only override writestartElement() to keep the name of the current element and writeCharacters().
In writeCharacters(), you'd just delegate to the super one, except when you need to add CDATA, in which case you will delegate to writeCDATa()...

Some simple example is here, you just need to add writeCharacters(...)

http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/CustomXmlStreamWriter.java

How to register it :
http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/XmlStreamWriterProvider.java

Thus I'm closing this JIRA as I feel the solution is now possible....Please reopen it if using a custom writer won't help...



> Rest services String response into a CDATA section.
> ---------------------------------------------------
>
>                 Key: CXF-1089
>                 URL: https://issues.apache.org/jira/browse/CXF-1089
>             Project: CXF
>          Issue Type: Improvement
>          Components: REST
>            Reporter: Vincenzo Vitale
>             Fix For: 2.2.2
>
>
> Exposing a rest service (using annotation) the String result values are escaped. It would be nice to have the possibility to include these values in a  CDATA section, in the same way it's done with the same service exposed using Soap.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.