post your route to recreate if it's not working.

On Tue, Aug 27, 2013 at 4:36 AM, Sven Bauhan <s...@ast.dfs.de> wrote:

> On 08/26/13 16:43, Christian Posta wrote:
>
>> At the moment, there is a filtering writer that camel uses by default, and
>> unfortunately it's not configurable at the moment. If you open a JIRA i
>> will get a patch for you to make it configurable.
>>
>>  Hey thanks. I will open a ticket in Jira. But I need a solution til the
> end of the week. So I think I have to create an own Dataformat definition
> as workaround now.
>
>  Hi,
>>>
>>> as JAXB does not escape special characters when marshaling, there exists
>>> a
>>> solution to use a special EscapingXMLStreamWriter (see
>>> http://blog.lesc.se/2009/03/****escape-illegal-characters-**<http://blog.lesc.se/2009/03/**escape-illegal-characters-**>
>>> with-jaxb-xml.html<http://**blog.lesc.se/2009/03/escape-**
>>> illegal-characters-with-jaxb-**xml.html<http://blog.lesc.se/2009/03/escape-illegal-characters-with-jaxb-xml.html>
>>> >).
>>> I used this in combination with org.apache.commons.lang.****
>>> StringEscapeUtils
>>>
>>> to replace the strings.
>>>
>>> But I do not know how to replace the XMLStreamWriter used by
>>> JaxbDataFormat with my implementation. Is there a way to tell the
>>> JaxbDataFormat to use my EscapingXMLStreamWriter when marshaling?
>>>
>>> The only other solution I could image is to define a Converter for the
>>> data field and call it via the bindings.xjb. But that is just a
>>> workaround.
>>>
>>>  Hmm this does not work. The converted string is escaped then twice with
> the result, that the '&' is replaced again by '&amp;'
>
>


-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Reply via email to