File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

AXIS and Classpath

David Kincade

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)
import com.this.that.Sample; // found in jar file sample.jar

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

Joined: Mar 22, 2005
Posts: 42965
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.
I agree. Here's the link:
subject: AXIS and Classpath
It's not a secret anymore!