I am trying to use the axis-java2wsdl ant task to create a wsdl from one of my java classes, but I cannot get the classpath correct.
I am using Ubuntu's libaxis-java package which installs axis-ant.jar in $ANT_HOME/lib and axis.jar in /usr/share/java. The interesting parts of my build.xml look like this:
<property name="library.dir" value="lib"/>
<property name="system.library.dir" value="/usr/share/java"/>
<path id="libraries">
<fileset dir="${library.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${system.library.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="genwsdl" depends="compile">
<taskdef resource="axis-tasks.properties" classpathref="libraries"/>
<axis-java2wsdl>
details omitted
</axis-java2wsdl>
</target>
Running ant genwsdl
results in:
/build.xml:50: taskdef A class needed by class
org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask
cannot be found: org/apache/axis/utils/DefaultAuthenticator
Ant is able to find the definition of the axis-java2wsdl task, because axis-ant.jar is in $ANT_HOME/lib, but it cannot find classes in axis.jar, even though that jar is on the path defined by "libraries"
I know it's a classpath issue because I was able to get past DefaultAuthenticator to other class's not found by symlinking axis.jar into $ANT_HOME/lib. How can I get the taskdef to recognize jar files in /usr/share/lib or my project's local lib directory without symlinking everything into $ANT_HOME/lib?
EDIT:
I was finally able to successfully generate the wsdl with this line:
ant -lib /usr/share/java/axis.jar -lib /usr/share/java/jaxrpc.jar -lib /usr/share/java/wsdl4j.jar -lib /usr/share/java/commons-logging.jar -lib /usr/share/java/commons-discovery.jar -lib build genwsdl
I would still very much appreciate if somebody could tell me what I'm doing wrong in not being able to define those libraries in build.xml