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 entri
To achieve the desired behaviour and avoid exceptions being thrown, you'll have to extend the default Woodstoks factory com.ctc.wstx.stax.WstxOutputFactory
with your own's, that's supposed only to overwrite the property com.ctc.wstx.outputInvalidCharHandler
with an instance of com.ctc.wstx.api.InvalidCharHandler.ReplacingHandler
. This handler takes as constructor argument the replacement char to the invalid ones. With your instance in hand, create a file named META-INF/services/javax.xml.stream.XMLOutputFactory
and place inside it only the complete name of your implementation (make sure it'll be placed inside the META-INF/services directory in the resulting jar).
You can find more details here.
HTH!