在进行soa webservice开发时,您可能会遇到类似以下的错误信息:
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:509)
Invalid white space character (0x1) in text to output
Invalid white space character (0x2) in text to output
……
Invalid white space character (0x7) in text to output
Invalid white space character (0x8) in text to output
……
Invalid white space character (0x14) in text to output
……
这是因为soa webservice信息的传递是基于xml文件格式,而xml文件格式无法直接处理空白字符,如果遇到这些特殊的空白字符,则会出错。比如&在xml文件中得用&表示,>得用<表示,<得用>表示,不能直接在xml中写成&,>,<,当然用<!CDATA[]]>例外。
现在修改了wstx包中的源码,凡遇到类似的特殊空白字符时就用' '替换,不会再出现以上错误。
。
解决Invalid white space character (0x …… 文件下载后可直接使用
最新推荐文章于 2021-02-27 13:50:18 发布