I’m using Spring, CXF and Hibernate to build a WebService that perform search queries on a foreign database that I have read-only access.
The problem is that some entries in the database have strange characters (0x2) in text fields, and it seems that CXF or the library (Aegis?) that it uses to process/serialize the objects returned from the Hibernate session can’t deal with it:
org.apache.cxf.aegis.DatabindingException: Error writing document.. Nested exception is com.ctc.wstx.exc.WstxIOException: Invalid white space character (0x2) in text to output (in xml 1.1, could output as a character entity)
How do I get around that?
Ideally, I could just remove those characters, since they don’t matter for my output…
Thanks!
source: http://www.theplancollection.com/house-plan-related-articles/hexadecimal-value-invalid-characterheplancollection.com/house-plan-related-articles/hexadecimal-value-invalid-character