"
at [row,col {unknown-source}]: [1,199]
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at my.dev.TestServiceStub.fromOM(TestServiceStub.java:2864)
at my.dev.TestServiceStub.test(TestServiceStub.java:192)
at my.dev.TestClient.main(TestClient.java:252)
Caused by: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ':' (code 58) excepted space, or '>' or
"/>"
at [row,col {unknown-source}]: [1,199]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:293)
at org.apache.axiom.om.impl.SwitchingWrapper.updateNextNode(SwitchingWrapper.java:1099)
at org.apache.axiom.om.impl.SwitchingWrapper.(SwitchingWrapper.java:234)
at org.apache.axiom.om.impl.OMStAXWrapper.(OMStAXWrapper.java:73)
at org.apache.axiom.om.impl.llom.OMStAXWrapper.(OMStAXWrapper.java:52)
at org.apache.axiom.om.impl.llom.OMElementImpl.getXMLStreamReader(OMElementImpl.java:795)
at org.apache.axiom.om.impl.llom.OMElementImpl.getXMLStreamReaderWithoutCaching(OMElementImpl.java:765)
at my.dev.TestServiceStub.fromOM(TestServiceStub.java:2858)
... 2 more
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ':' (code 58) excepted space, or '>' or "/>"
at [row,col {unknown-source}]: [1,199]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:648)
at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:2965)
at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2936)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2848)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:672)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 9 more
Added code below and the warn was solved.
System.setProperty("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory"); System.setProperty("javax.xml.stream.XMLOutputFactory", "com.ctc.wstx.stax.WstxOutputFactory"); System.setProperty("javax.xml.stream.XMLEventFactory", "com.ctc.wstx.stax.WstxEventFactory");
However, I encountered another problem
org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ':' (code 58) excepted space, or '>' or "/>" at [row,col {unknown-source}]: [1,199] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
堆栈跟踪表明 XML 格式不正确(开始标记中的某处存在非预期的“:”字符)或者 XML 解析器存在问题。您使用的是哪个版本的 Woodstox?警告“无法确定 StAX 实现的方言”可能表示您正在使用的版本不受支持。我强烈建议您尝试消除该警告(实际上我是编写生成该警告的代码的人)。否则您可能会在 Axis2 中遇到微妙的问题。
The stack trace indicates that either the XML is malformed (there is a ':' character somewhere in a start tag that is not expected) or there is an issue with the XML parser. What version of Woodstox are you using? The warning "Unable to determine dialect of the StAX implementation" may indicate that the version you are using is not supported. I strongly recommend that you try to get rid of that warning (I'm actually the person who wrote the code that generates that warning). Otherwise you may encounter subtle issues in Axis2.
如果您使用 SOAP WS,请在 Web 方法调用中检查 XML 请求参数。 XML 解析级别可能存在一些问题。
If you are using SOAP WS than check the XML request parameter at your web method call. There may be some problem at XML parsing level.