当前位置:首页 > 开发 > 互联网 > 正文

Character reference "�" is an invalid XML character.

发表于: 2014-07-10   作者:alleni123   来源:转载   浏览次数:
摘要: org.xml.sax.SAXParseException: Character reference "&#x0" is an invalid XML character. at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.SOAPPart.getAsSOA
org.xml.sax.SAXParseException: Character reference "&#x0" is an invalid XML character.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.tempuri.DataSoapStub.getEmailInfo(DataSoapStub.java:7146)
at org.tempuri.DataSoapProxy.getEmailInfo(DataSoapProxy.java:362)
at net.wecash.crawler.services.MailHarmonyService.main(MailHarmonyService.java:88)
Caused by: org.xml.sax.SAXParseException: Character reference "&#x0" is an invalid XML character.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanCharReferenceValue(XMLScanner.java:1295)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3016)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
... 11 morenull


今天在使用webservice的时候遇到这个异常。
似乎是因为服务器端的返回数据中包含了xml相关的标签内容。



宝鸡市力华有色金属有限公司长期供应各种类型的钛法兰:材质:TA1 TA2 TA3 TA4 TC4(
Gr1  Gr2  Gr3  Gr4  Gr5)大型法兰、普通法兰、异型法兰、
法兰盖、松套法兰、带颈法兰、高颈法兰、平焊法兰、螺纹法兰、整体法兰、非标法兰、意标法兰、日标法兰、英标法兰、
德标法兰、美标法兰、国标法兰、法兰盘、其它法兰。如您有这方面的需要可以联系我们电话:0917-3381644/3194223 
&nbsp;传真:0917-3386199&lt;<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=
_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize=
"21600,21600"> <v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f>
<v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600
pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2">
</v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight">
</v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f">
</v:path><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:lock aspectratio="t" v:ext="edit"></o:lock>
</v:shapetype><v:shape style="WIDTH: 10.5pt; HEIGHT: 10.5pt" id=_x0000_i1025 type="#_x0000_t75" alt="">
<v:imagedata o:href="alires://MsgHistory/UnknownUrl.bmp" src="file:///C:DOCUME~1ADMINI~1LOCALS~1Tempmsohtml1


可以看到这里有大量的xml标签。

这里让服务器端做一下处理,就可以解决问题。

Character reference "�" is an invalid XML character.

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
JLSINT用了快一年了,结合Jekins来使用,很是方便。配置文件什么的,只要拷贝拷贝就可以了的。 不过
JLSINT用了快一年了,结合Jekins来使用,很是方便。配置文件什么的,只要拷贝拷贝就可以了的。 不过
web.xml报错Invalid content was found starting with element 'init-param'. 原文来自:http://www
在利用postGIS导入shapefile文件到postgresql数据库的时候,老是提示字符串的问题,或者是乱码,试
文件格式:.wmv;大小:6,331KB;长度:00:03:53。 下载地址:http://download.cnblogs.com/insus/A
Part 1 http://techmytalk.com/2014/01/24/java-interview-reference-guide-part-1/ Posted on Janu
原文http://hi.baidu.com/mxp446533129/blog/item/5d9f3812b3e9c414213f2e3b.html 用perl写文本处理
字符流 • 尽管字节流提供了处理任何类型输入/输出操作的足够的功能,它们不能直接操作Unicode字符
今天在代码打包时报如下错误::1: illegal character: 5279 查看文件确实是UTF-8的最后在高人指点下
原文http://hi.baidu.com/mxp446533129/blog/item/5d9f3812b3e9c414213f2e3b.html 用perl写文本处理
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号