I developed a client connecting a web service with axis2 1.6.1. However, I encountered the following errors while everything works with axis2 1.5.2
The error is at the line
_operationClient.execute(true); //inside TestServiceStub
[WARN] Unable to determine dialect of the StAX implementation at jar:file:/D:/Test/TestClient/TestClient.jar!/ 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) 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)