问题描述
JAVA用Axis2工具wsdl2java生成的客户端服务端是C++GSoap发布的webservice遇到如下问题很明显是编码的问题但是Axis2生成的客户端太乱,我无从下手,不知道在哪里做处理,希望遇到或者解决的朋友帮帮忙log4j:WARNNoappenderscouldbefoundforlogger(org.apache.axis2.description.AxisService).log4j:WARNPleaseinitializethelog4jsystemproperly.org.apache.axis2.AxisFault:com.ctc.wstx.exc.WstxIOException:InvalidUTF-8startbyte0xb2(atchar#518,byte#127)atorg.apache.axis2.AxisFault.makeFault(AxisFault.java:430)atorg.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:123)atorg.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)atorg.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)atorg.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)atorg.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)atorg.apache.axis2.client.OperationClient.execute(OperationClient.java:165)atmicrowisesoa.MicrowiseSoaStub.jgetAllNodeInfo(MicrowiseSoaStub.java:22291)atmicrowise.test.Test.main(Test.java:20)Causedby:org.apache.axiom.om.OMException:com.ctc.wstx.exc.WstxIOException:InvalidUTF-8startbyte0xb2(atchar#518,byte#127)atorg.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:260)atorg.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:161)atorg.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:110)atorg.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:60)atorg.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:197)atorg.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)atorg.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:108)...7moreCausedby:com.ctc.wstx.exc.WstxIOException:InvalidUTF-8startbyte0xb2(atchar#518,byte#127)atcom.ctc.wstx.sr.StreamScanner.throwFromIOE(StreamScanner.java:683)atcom.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1086)atjavax.xml.stream.util.StreamReaderDelegate.next(StreamReaderDelegate.java:60)atorg.apache.axiom.om.impl.builder.SafeXMLStreamReader.next(SafeXMLStreamReader.java:183)atorg.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:597)atorg.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:172)...13moreCausedby:java.io.CharConversionException:InvalidUTF-8startbyte0xb2(atchar#518,byte#127)atcom.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)atcom.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)atcom.ctc.wstx.io.MergedReader.read(MergedReader.java:101)atcom.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:84)atcom.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57)atcom.ctc.wstx.sr.StreamScanner.loadMoreFromCurrent(StreamScanner.java:1021)atcom.ctc.wstx.sr.StreamScanner.parseLocalName2(StreamScanner.java:1771)atcom.ctc.wstx.sr.StreamScanner.parseLocalName(StreamScanner.java:1731)atcom.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:2986)atcom.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2934)atcom.ctc.wstx.sr.BasicStreamReader.handleRootElem(BasicStreamReader.java:2093)atcom.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2073)atcom.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)...17more