Search code examples
javawsdlapache-axis

Generating wsdl using AXIS2 java2wsdl Tool


I am trying to generate the a wsdl file for a simple java interface class shown below

package hellowebservice;

public interface hello {
   void sayHello(String s);
}

This is contained in hello.java.

I compile using

javac hello.java

Then run the tool:

~/Downloads/axis2-1.6.1/bin/java2wsdl.sh -cp "./" -cn hellowebservice.hello 

However I am getting the following error:

 Exception in thread "main"
 java.lang.ClassNotFoundException: hellowebservice.hello

Any idea what the problem might be?


Solution

  • Looks like a classpath issue. Make sure you're in the parent of hellowebservice folder when you run java2wsdl.sh.