I just filled a JIRA[1] for adding an out of box support in camel-jaxb.
So you don't need to use covertTo() DSL any more.

[1] https://issues.apache.org/activemq/browse/CAMEL-2330

Willem


Willem Jiang wrote:
Hi,

I think you can write a type converter[1] which can turn the InputStream to a JAXB safe (which filters the control characters) InputStream.

Then can define your route like this

from("direct:start").covertTo(JaxbSafeInputStream.class).unmarshal(new JaxbDataFormat("org.apache.camel.example")).to("mock:endpoint");

If so I'd like to integrate it into camel-jaxb :)

[1] http://camel.apache.org/type-converter.html

Willem


Pavel wrote:
I found a few relevant links:

http://old.nabble.com/UTF-8-characters-jaxb-td25531336.html#a25531336
http://www.w3.org/TR/2004/REC-xml-20040204/#NT-Char

Seems like this topic was discussed already, but I'm not if relevant
replacement mechanism made it into camel.

Pavel

On Thu, Dec 31, 2009 at 3:23 PM, Pavel <pag...@gmail.com> wrote:

Hi,

I'm looking for the way to filter out control characters prohibited by XML spec at/after marshalling. Otherwise consumers are unable to unmarshal the
content.

Is there an out of the box means for doing that? If not, can you recommend
the right way for doing that?

I just did similar exercise with CXF, there it was took creating custom
XMLStreamWriter and using outbound interceptor to replace original writer
with custom one.

Thanks,
Pavel





Reply via email to