我在服务器上部署了一个webservice系统(系统1),接受来自其他系统的报表;同时,在服务器上也部署了一个系统(系统2),系统2可以将产生的报表发送到系统1。在发送的时候出现如下错误。
同时,我在本地也启动了系统2(测试用的),但是在本地将系统2产生的报表发送到系统1的时候没有问题。
系统1的http://192.168.0.251/pdbb/services/AddReportService?wsdl 这个service是能正常运行的,也能正常接受我本地发送的报表,但是在系统2上面发送的就报错,请各位大虾指点指点。
我有同事说可能是系统2跟系统1出现包冲突,可是我已经把系统2和系统1的axis的包都换成一样的了。
(ReportSendClient.java:48) INFO 2007-01-22 13:10:48,281 [com.emore.webservice.ReportSendClient]-[INFO] http://192.168.0.251/pdbb/services/AddReportService?wsdl
07/01/22 13:10:49 AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.SocketException: Socket is not connected: connect
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.SocketException: Socket is not connected: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.emore.webservice.ReportSendClient.sendReport(ReportSendClient.java:66)
------解决方法--------------------------------------------------------
异常说得多清楚啊,Socket is not connected: connect 。是在com.emore.webservice.ReportSendClient.sendReport(ReportSendClient.java:66) 这一行报错的,你看看代码吧,这一行是什么,反正就是ip和端口错误了,根本连接不上嘛。