2 Replies Latest reply on May 12, 2004 2:03 AM by jecop

    the client doesn't work ??????

    alemito

      Hi,
      I am trying with the Hello World web service example ... everything works, the service is deployed, I have also checked via http://localhost:8080/jboss-net/servlet/AxisServlet, the application tcpmon starts ...but ...

      the client doesn't start ! I receive this log error :

      java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
      at org.apache.axis.components.logger.LogFactory.class$(LogFactory.java:84)
      at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:84)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:80)
      at org.apache.axis.components.logger.LogFactory.(LogFactory.java:72)
      at org.apache.axis.handlers.BasicHandler.(BasicHandler.java:81)
      at org.apache.axis.client.Service.getAxisClient(Service.java:143)
      at org.apache.axis.client.Service.(Service.java:152)
      at Client.main(Client.java:14)
      Exception in thread "main"

      I report my client class:

      import org.apache.axis.client.Call;
      import org.apache.axis.client.Service;
      import javax.xml.rpc.ParameterMode;
      //import javax.xml.namespace.QName;

      public class Client
      {
      public static void main(String [] args) {
      try {
      String endpoint =
      "http://localhost:8070/jboss-net/services/Hello";
      String methodName = "getHelloWorldMessage";

      Service service = new Service();
      Call call = (Call) service.createCall();

      call.setTargetEndpointAddress( new java.net.URL(endpoint) );
      call.setOperationName(methodName);

      // Call to addParameter/setReturnType as described in user-guide.html
      call.addParameter("name",
      org.apache.axis.Constants.XSD_STRING,
      ParameterMode.IN);
      call.setReturnType(org.apache.axis.Constants.XSD_STRING);

      String ret = (String) call.invoke( new Object[] { "AXIS!" } );

      System.out.println(ret);
      } catch (Exception e) {
      System.err.println(e.toString());
      }
      }
      }

      thank you all

        • 1. Re: the client doesn't work ??????
          darranl

          Is the class 'org.apache.commons.logging.LogFactory' on the classpath of the client?

          • 2. Re: the client doesn't work ??????
            jecop

            Quote from the Axis documentation:
            ---
            To redistribute an application running Axis, you need to redistribute

            axis.jar

            commons-logging.jar

            A logging implementation compatible with commons-logging. As Java1.4's intrinsic logging facility is compatible, you do not need to include a logging JAR for Java1.4. Otherwise the log4j.jar is a good one to use

            A logging configuration file for your chosen logger.

            An XML Parser. Java1.4 ships with crimson, although the axis team strongly recommend xerces over crimson.

            commons-discovery.jar
            ----
            So you need to make sure all mentioned jars are on the classpath
            You should be able to find them in the JBoss distribution