File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes AXIS and Classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "AXIS and Classpath" Watch "AXIS and Classpath" New topic
Author

AXIS and Classpath

David Kincade
Greenhorn

Joined: Nov 10, 2005
Posts: 7
I am trying to use Axis to turn a Java Class into a webservice. However, one of the methods in my java class accepts a java class found in a jar file. This causes Axis to throw a ClassNotFoundException when I run the ant task <Axis-java2wsdl>

Example: If I try to turn the folloing class into a webservice using axis' ant task <Axis-java2wsdl>, I will get a ClassNotFoundException on class com.this.that.Sample (even though I have put this jar in the classpath)

MyWebService.java
...
import com.this.that.Sample; // found in jar file sample.jar

public class MyWebService {
public static int foo(Sample sample) {
...
}
}
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41600
    
  55
I don't think Ant uses CLASSPATH variable. Make sure the jar file is in the classpath for the java2wsdl task. Ants "-verbose" option is very useful in tracking down problems like this.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AXIS and Classpath