5

尝试从客户端应用订阅服务时出现以下错误。有人能告诉我这个例外的原因吗?

提前致谢

org.apache.axis2.AxisFault: Conexión rehusada

        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)

        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:197)

        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)

        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)

        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)

        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)

        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)

        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)

        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

        at com.tissat.echo.wsdl.EchoServiceStub.suscribe(EchoServiceStub.java:772)

        at com.tissat.echo.servicios.ServicioLisa.cliSuscribirse(ServicioLisa.java:122)

        at com.tissat.echo.servicios.ClienteLisa.Conectar(ClienteLisa.java:23)

        at com.tissat.echo.rmi.ServidorLisaTomcat.connectSuscription(ServidorLisaTomcat.java:150)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

        at sun.rmi.transport.Transport$1.run(Transport.java:177)

        at sun.rmi.transport.Transport$1.run(Transport.java:174)

        at java.security.AccessController.doPrivileged(Native Method)

        at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

引起:java.net.ConnectException: Conexión rehusada

        at java.net.PlainSocketImpl.socketConnect(Native Method)

        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)

        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)

        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)

        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

        at java.net.Socket.connect(Socket.java:579)

        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)

        at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)

        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)

        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)

        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)

        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)

        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)

        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)

        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)

        ... 26 more

org.apache.axis2.AxisFault: Conexión rehusada

4

3 回答 3

1

拒绝连接意味着以下内容:

主机存在,没有任何东西正在监听该端口上的连接。或者,防火墙阻止了该端口。

更多信息: http: //axis.apache.org/axis/java/client-side-axis.html

于 2014-05-30T08:59:27.987 回答
1

我们遇到了类似的问题,在尝试调用安全的 Web 服务时遇到了 Read Time Out,经过长时间的分析,我们发现传输协议版本不匹配。Web 服务在 http1.0 上提供服务,我们使用 http1.1 调用它。我们修改了客户端代码中的协议版本,解决了这个问题:

下面是指定http version-1.0 options.setProperty(org.apache.axis2.transport.http.HTTPConstants.HTTP_PROTOCOL_VERSION, org.apache.axis2.transport.http.HTTPConstants.HEADER_PROTOCOL_10)的代码;

于 2014-12-17T09:03:40.377 回答
0

似乎Service没有在您认为它正在运行的地方运行。检查它是否在所需的端口中正常运行。这ConnectionRefused就是抛出异常的原因。确保您没有防火墙阻止该端口。

如果该机器上的服务没有创建套接字并且没有在该端口上侦听。您将看到消息连接被拒绝。

于 2014-05-30T08:59:29.030 回答