如何解决java axis 调用webservice服务器操作异常
1个回答
2017-09-20
展开全部
报错信息为:AxisFaultfaultCode:{http://schemas.xmlsoap.org/soap/envelope/}Server.userExceptionfaultSubcode:faultString:java.net.ConnectException:Connectionrefused:connectfaultActor:faultNode:faultDetail:{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException:Connectionrefused:connectatjava.net.PlainSocketImpl.socketConnect(NativeMethod)atjava.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)atjava.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)atjava.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)atjava.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)atjava.net.Socket.connect(Socket.java:516)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)atorg.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)atorg.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)atorg.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)atorg.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)atorg.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)atorg.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)atorg.apache.axis.SimpleChain.invoke(SimpleChain.java:83)atorg.apache.axis.client.AxisClient.invoke(AxisClient.java:165)atorg.apache.axis.client.Call.invokeEngine(Call.java:2784)atorg.apache.axis.client.Call.invoke(Call.java:2767)atorg.apache.axis.client.Call.invoke(Call.java:2443)atorg.apache.axis.client.Call.invoke(Call.java:2366)atorg.apache.axis.client.Call.invoke(Call.java:1812)atcom.sendServer.TongdaoWs.invokeWg(TongdaoWs.java:114)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)atorg.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)atorg.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)atorg.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)atorg.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)atorg.apache.axis.SimpleChain.invoke(SimpleChain.java:83)atorg.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)atorg.apache.axis.server.AxisServer.invoke(AxisServer.java:281)atorg.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:710)atorg.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(Thread.java:595)axis自动生成的wsdl文件是有问题的,在他的wddlsoap标签中会使用localhost作为访问地址,这样当然是只有本机访问正常,其他机器访问不了,解决法就是修改一下这个地址,比如的地址是10.154.23.153,那么就把这里改为:这样,问题就解决了。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询