3 Replies Latest reply on Mar 7, 2005 5:53 AM by Thomas Quas

    Duke?s Bank Application - WS client problem

    Pol Bohec Newbie

      I try to run the Duke?s Bank Application as a web service from JBoss Getting Started Guide 4.0 (v2). When my server and client are on the same JVM, all works fine, but when I tried to run WS client from own JVM, I got this exception.

      Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
      at $Proxy0.getAccountsOfCustomer(Unknown Source)
      at com.jboss.ebank.WSClient.main(WSClient.java:31)
      Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
      at java.net.Socket.connect(Socket.java:507)
      at java.net.Socket.connect(Socket.java:457)
      at java.net.Socket.(Socket.java:365)
      at java.net.Socket.(Socket.java:178)
      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


      Of course I replace needed localhost adresses by my.server adress in source files. Can anybody help me, what I have to change else ?

        • 1. Re: Duke?s Bank Application - WS client problem
          Thomas Quas Newbie

          so i get the same problem when trying to access my web service from a remote client using the zsi python package.

          i looked into the server's conf/login-config.xml and found a policy for jbossws. it says

          <application-policy name="JBossWS">

          <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
          flag="required">
          <module-option name="unauthenticatedIdentity">anonymous</module-option>
          </login-module>

          </application-policy>


          deploy/jboss-ws4ee.sar/META-INF/axis-server.config.xml says:


          <!-- handlers invoked immediately after an incoming http request -->

          <!-- if soapaction is empty (""), we try the legacy URLMapper -->

          <!-- http basic authentication is mapped to the axis message context -->





          so where do i have to configure access privileges to my service?

          • 2. Re: Duke?s Bank Application - WS client problem
            Thomas Quas Newbie

            oops, copy-paste problem; axis-server-config.xml looks like:








            • 3. Re: Duke?s Bank Application - WS client problem
              Thomas Quas Newbie

              it's not true, is it? the preview correctly displayed the lines of axis-server-config.xml, however, nukes or whatever it's called can't seem to handle it. sorry

              transport name="http"
              requestFlow
              handler type="java:org.apache.axis.handlers.http.URLMapper"/
              handler typ="java:org.apache.axis.handlers.http.HTTPAuthHandler"/
              /requestFlow
              /transport