Trouble with WSClient
raygardner Mar 17, 2005 1:11 PMI am trying to execute 'ant -f jboss-build.xml run-ws', as instructed in Chapter 5. It is not working though. Here is the error:
(Ignore the log4j warnings at the beginning. My problem is with the
'UndeclaredThrowableException'.)
Buildfile: jboss-build.xml
run-ws:
[java] log4j:WARN No appenders could be found for logger (org.jboss.webservice.EngineConfigurationFinder).
[java] log4j:WARN Please initialize the log4j system properly.
[java] Customer: 200
[java] Exception in thread "main" java.rmi.RemoteException: null; nested exception is:
[java] java.lang.reflect.UndeclaredThrowableException
[java] at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:184)
[java] at $Proxy1.getAccountsOfCustomer(Unknown Source)
[java] at com.jboss.ebank.WSClient.main(WSClient.java:34)
[java] Caused by: java.lang.reflect.UndeclaredThrowableException
[java] at $Proxy0.getAccountsOfCustomer(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:111)
[java] ... 2 more
[java] Caused by: java.net.ConnectException: Connection refused: connect
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
[java] at java.net.Socket.connect(Socket.java:507)
[java] at java.net.Socket.connect(Socket.java:457)
[java] at java.net.Socket.<init>(Socket.java:365)
[java] at java.net.Socket.<init>(Socket.java:178)
[java] at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:133)
[java] at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:161)
[java] at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:117)
[java] at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
[java] at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:160)
[java] at org.apache.axis.SimpleChain.invoke(SimpleChain.java:123)
[java] at org.jboss.webservice.client.ClientEngine.invoke(ClientEngine.java:126)
[java] at org.apache.axis.client.Call.invokeEngine(Call.java:3029)
[java] at org.apache.axis.client.Call.invoke(Call.java:3014)
[java] at org.apache.axis.client.Call.invoke(Call.java:2608)
[java] at org.apache.axis.client.Call.invoke(Call.java:2513)
[java] at org.apache.axis.client.Call.invokeInternal(Call.java:1973)
[java] at org.apache.axis.client.Call.invoke(Call.java:1914)
[java] at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
[java] at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:372)
[java] ... 8 more
[java] Java Result: 1
I don't know why this is happening because followed the instruction in Chapter 4 and Chapter 5. I had to make one change to WSClient.java. The URL it specified was hard-coded to port 8080. I'm running on port 80 so I changed this URL. Nothing else changed.
Any help will be greatly appreciated.