You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kevin <gl...@gmail.com> on 2013/10/17 02:40:34 UTC

Custom output with Apache CXF

I have a Java class to strip out malicious HTML/JS code from a string that
I would like to run after the JacksonJsonProvider serialization. What's the
best way to approach it with the CXF framework?

Thanks.

Re: Custom output with Apache CXF

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 17/10/13 01:40, Kevin wrote:
> I have a Java class to strip out malicious HTML/JS code from a string that
> I would like to run after the JacksonJsonProvider serialization. What's the
> best way to approach it with the CXF framework?

Perhaps you can have a simple delegating JAX-RS MessageBodyReader that 
will directly invoke on JacksonJsonProvider.readFrom first and then 
post-process the data as needed ?

Or you can try custom invokers or interceptors, see
https://issues.apache.org/jira/browse/CXF-5309?focusedCommentId=13789196&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13789196

HTH, Sergey

>
> Thanks.
>