3 Replies Latest reply on May 4, 2005 10:29 AM by Simon Bøggild

    Trouble with WSClient

    Raymond Gardner Newbie

      I 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

      Buildfile: jboss-build.xml

      [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.

        • 1. Re: Trouble with WSClient
          Raymond Gardner Newbie

          I pointed my server back to port 8080, as well as the WSClient. After re-compiling the client, it now works.

          So, this tells me that Web Services is tied to port 8080. Is there a way to change the port that Web Services uses?

          • 2. Re: Trouble with WSClient
            Raymond Gardner Newbie

            As I indicated in the previous post, I got WSClient working by going back to port 8080.

            However, the next section in Chapter 5 asks to change the front-end port to 7070 so tcpmon may intercept traffic. I did this but now WSClient will not work. Here is the error:

            ant -f jboss-build.xml run-ws
            Buildfile: jboss-build.xml

            [java] log4j:WARN No appenders could be found for logger (org.jboss.webservice.EngineConfigurationFinder).
            [java] log4j:WARN Please initialize the log4j system properly.
            [java] Exception in thread "main" javax.xml.rpc.ServiceException: Error processing WSDL document:
            [java] java.net.ConnectException: Connection refused: connect
            [java] at org.apache.axis.client.Service.initService(Service.java:287)
            [java] at org.apache.axis.client.Service.<init>(Service.java:189)
            [java] at org.jboss.webservice.client.ServiceImpl.<init>(ServiceImpl.java:106)
            [java] at org.jboss.webservice.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:112)
            [java] at com.jboss.ebank.WSClient.main(WSClient.java:26)
            [java] Java Result: 1

            I probably don't have something configured correctly but I followed the instructions as best I could. Seems like web services does not like uses a different port from 8080.

            • 3. Re: Trouble with WSClient
              Simon Bøggild Newbie

              Hi there

              I have the exact same problem as the aforementioned one with WSClient after changing the port to 7070.
              I've changed the port number in both WSClient.java and jboss-service.xml in the <mbean code="org.jboss.webservice.AxisService" section. Recompiled, repackaged, redeployed, restarted server, but still it doesn't work.
              The error message is the same as the above mentioned posting.

              Any ideas?????