strage problem tcpmon
singular_droid Mar 4, 2005 3:36 AMHi all!
For a couple of days I'm trying to overcome one strange problem:
I'm trying to create my own simple ws and as example I'm using this guide:
http://docs.jboss.org/jbossas/getting_started/startguide40/ws.html
and i hava similar build and similar classpath(if needed I can post'em all). So my jar succesfully deployed on my jboss server, wich is located on a remote intanet host with ip 192.168.0.200/24.
Deploymet is succesfull cause there are no errors in server.log and I can retrive the wsdl of my ws in browser:
" http://192.168.0.200:8080/EJB4/HelloBeanService?wsdl"
So I think that it is successfull :)
I have created a simple test class of my ws named as in tutorial "WSClient" and here it is:
package ru.zenith.ejb; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.rpc.Service; import javax.xml.rpc.ServiceFactory; public class WSClient { public static void main(String[] args) throws Exception { URL url = new URL("http://192.168.0.200:8080/EJB4/HelloBeanService?wsdl"); QName qname = new QName("http://interfaces.zenith.ru","HelloBeanService"); ServiceFactory factory = ServiceFactory.newInstance(); Service service = factory.createService(url, qname); ru.zenith.interfaces.HelloBeanEndpoint endpoint = (ru.zenith.interfaces.HelloBeanEndpoint) service.getPort(ru.zenith.interfaces.HelloBeanEndpoint.class); String ids = endpoint.hello("lalala"); System.out.println("Message from WS: " + ids); } }
Also i have a tcpmon.jar wich is a simple soap-monitor. And now the stranges are started.
When I start the tcpmon monitor with parameters
local port = 8080
remote host = 192.168.0.200
remote port = 8080
my client working correctly and I see the stdout message
Message from WS:Hello,lalala
but when I'm trying to run my client class without run the tcpmon exception occured:
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException at $Proxy0.hello(Unknown Source) at WSClient.main(WSClient.java:37) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:135) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:162) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:118) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:162) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:125) at org.jboss.webservice.client.ClientEngine.invoke(ClientEngine.java:126) at org.apache.axis.client.Call.invokeEngine(Call.java:3039) at org.apache.axis.client.Call.invoke(Call.java:3024) at org.apache.axis.client.Call.invoke(Call.java:2619) at org.apache.axis.client.Call.invoke(Call.java:2524) at org.apache.axis.client.Call.invokeInternal(Call.java:1976) at org.apache.axis.client.Call.invoke(Call.java:1917) at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:175) at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:251) ... 2 more
If somebody know in what the problem is, please tell me.