0 Replies Latest reply on Mar 18, 2006 5:57 PM by Pierre Chastagner

    JBoss-IDE and web Service

    Pierre Chastagner Newbie

      Hello,

      I am trying to use web service and I am getting very confused... I read a whole bunch of tutorial and I don't really know what's up with axis and JBoss... Is axis in JBoss or is it not ??

      Anyway, I created a web service running on a Tomcat 5.0 server and Axis (it's a simple HelloWorld Web Service). I can reach the WSDL without any issue.

      I am developping an application on a JBoss Server. I need this application to use some web services located on other servers.
      In eclipse, using the JBoss-IDE plugin, I want to invoke this web service so I do :
      New > Web Service Test Client and I give the wizard the wsdl url and it creates several classes.

      Then, in my servlet I try to invoke the web service with the following code

      try {
      MyWebServiceHelloServiceLocator locator = new MyWebServiceHelloServiceLocator();
      MyWebServiceHello helloWS = locator.getMyWebServiceHello();
      out.println("RES du WS :
      ");
      out.println(helloWS.hello("Pierroot"));
      out.println("
      Fin du WS
      ");
      } catch (Exception e) {
      e.printStackTrace();
      }

      When I deploy and try to run the servlet (which works fine without the piece of code shown above) I get an error from JBoss :

      exception

      javax.servlet.ServletException: Error instantiating servlet class com.dexia.test.HelloWorldServlet
      org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      java.lang.Thread.run(Thread.java:595)

      root cause

      java.lang.NoClassDefFoundError: org/apache/axis/client/Service
      java.lang.ClassLoader.defineClass1(Native Method)
      java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1629)
      org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
      java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      java.lang.Class.getDeclaredConstructors0(Native Method)
      java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
      java.lang.Class.getConstructor0(Class.java:2640)
      java.lang.Class.newInstance0(Class.java:321)
      java.lang.Class.newInstance(Class.java:303)
      org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      java.lang.Thread.run(Thread.java:595)

      note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.

      I really don't know what's going and I've been spending hours on this... If anyone has an idea it would be so great !!

      Thanks for your help!

      PS : I run jboss-4.0.3SP1