How to deal with invalid characters in a WS output when using CXF?

前端 未结 4 1495
感动是毒
感动是毒 2021-02-07 06:00

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

4条回答
  •  无人共我
    2021-02-07 06:26

    I am not sure this answers your question, but here is what I found.

    Here is the class that throws the exception: http://svn.codehaus.org/woodstox/wstx/trunk/src/java/com/ctc/wstx/api/InvalidCharHandler.java

    Seems like there is a discussion on the issue here: http://comments.gmane.org/gmane.comp.apache.cxf.user/4373

    Maybe this might can you: You can also set a "disable.outputstream.optimization" property on the endpoint/bus to true to have it disable the direct writing to the outputstream and always go through the XMLStreamWriter. Should accomplish the same thing without the overhead of having the SAAJModel created.

    Hope this helps a bit.

提交回复
热议问题