问题描述
造成问题的原因是不能改变客户端的情况下开发WebService服务端,服务端程序用axis2+Spring开发的,能够成功发布,用客户端能够成功的调用,但是服务端获得的参数为null。如果改变客户端的soap编码格式,则可以获得参数具体值,代码为org.apache.axis.client.Call.setEncodingStyle(null),我想知道的是服务端是在哪里设置,因为客户端是其他公司开发的,对面不同意改源码,所以只能修改服务端,另外我是在services.xml中配置axis2的。
解决方案
解决方案二:
楼主你好,我遇到了一个和你一样的问题,请问你的问题搞定了吗,AXIS2服务端如何设置接收到报文的编码格式呀?查了蛮久没看到相关的内容。AXIS里面有个axis.xmlEncoding,但在AXIS2里却没有。请问应该怎么解决呀?
解决方案三:
我也有此问题,而且访问的时候还报错了,不知你们解决了没?org.apache.axis2.AxisFault:Invalidnullcharacterintexttooutputatorg.apache.axis2.AxisFault.makeFault(AxisFault.java:430)atorg.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:146)atorg.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:364)atorg.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:241)atorg.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)atorg.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43)atorg.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)atorg.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)atorg.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)atorg.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139)atorg.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:837)atorg.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:273)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:621)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:722)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)atorg.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:282)atorg.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:357)atorg.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1687)atjava.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)atjava.lang.Thread.run(Thread.java:619)Causedby:com.ctc.wstx.exc.WstxIOException:Invalidnullcharacterintexttooutputatcom.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:511)atorg.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeCharacters(XMLStreamWriterWrapper.java:100)atorg.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:325)atorg.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:249)atorg.apache.axiom.om.impl.llom.OMTextImpl.internalSerialize(OMTextImpl.java:400)atorg.apache.axiom.om.impl.util.OMSerializerUtil.serializeChildren(OMSerializerUtil.java:563)atorg.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:846)atorg.apache.axiom.om.impl.util.OMSerializerUtil.serializeChildren(OMSerializerUtil.java:563)atorg.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:846)atorg.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:188)atorg.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:143)...27moreCausedby:java.io.IOException:Invalidnullcharacterintexttooutputatcom.ctc.wstx.sw.XmlWriter.throwInvalidChar(XmlWriter.java:538)atcom.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter.java:531)atcom.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:509)...37more
解决方案四:
求解啊,遇到同样的问题,传值后已经调用到接口,但是传值为空,参数为空错误。