2 Replies Latest reply on Oct 11, 2007 2:47 PM by peterj

    how to use wsprovide

    fantagir

      Hi!

      I'm trying to generate the wsdl file and the artifacts of a webservice using wsprovide but appears the next error:

      Generating WSDL
      Error: Could not generate.
      java.lang.NoClassDefFoundError: javax/ejb/Stateless

      I'm working with Jboss-4.2.0GA. I execute the command wsprovide like this:

      c:\work> <Jboss-home>\bin\wsprovide -t -w echo.Echo

      My directory try is:

      c:\work\
      jboss-jaxws.jar
      echo\
      Echo.class
      Echo.java
      jboss-jaxws.jar

      My code is:

      package echo;
      
      @javax.jws.WebService
      public class Echo
      {
       public String echo(String input)
       {
       return input;
       }
      }


      Thanks

        • 1. Re: how to use wsprovide
          richard_opalka

          Try to execute wsprovide script in the JBoss/bin directory.

          Richard

          • 2. Re: how to use wsprovide
            peterj

            The wsconsume script does not include the ejb api jar file. Modify the script, adding this line to the set of lines that create the classpath:

            set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jboss-ejb3x.jar


            You could instead set WSCONSUME_CLASSPATH manually before running wsconsume, but usually editing the script is easier, especially if you will be running it often.