`

Character reference "&#x0" is an invalid XML character.

阅读更多
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标签。

这里让服务器端做一下处理,就可以解决问题。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics