I am trying to use axis-java2wsdl ant function to create one wsdl from one of my Java classes , But I can not find classpath right.
I am using Ubuntu libexis-java package which installs axis-ant.jar in $ ANT_HOME / lib and axis.jar in / usr / share / java. Interesting parts of my build.xml look like this:
& lt; Property name = "library.dir" value = "lib" /> & Lt; Property Name = "system.library.dir" value = "/ usr / share / java" /> & Lt; Path id = "library" & gt; & Lt; Fileset dir = "$ {library.dir}" & gt; & Lt; Include name = "* .jar" /> & Lt; / Fileset & gt; & Lt; Fileset dir = "$ {system.library.dir}" & gt; & Lt; Include name = "* .jar" /> & Lt; / Fileset & gt; & Lt; / Path & gt; & Lt; Target name = "genwsdl" dependent = "compilation" & gt; & Lt; Taskdef resource = "ax-task. Properties" classpathref = "library" /> & Lt; Axis-java2wsdl & gt; Details skipped & lt; / Axis-java2wsdl & gt; & Lt; / Target & gt;
is running ant genwsdl
in the result:
/build.xml:50: taskdef class org.apache required by Class .xis.tools.ant.wsdl.Wsdl2javaAntTask can not be found: Organization / Apache / Axis / UTIS / Default Extractor
Enabled to achieve Definition of Ant axis-Java 2 DSL work Is because axis -ant.jar is $ ANT_HOME / lib, but it can not find the square in axis.jar, even if that jar is on the path defined by the "libraries" I
I know It is a classpath issue because I had not got syllinking axis.jar at $ anT_HOME / lib to enable other classes to get past default Othentiketr.
Edit:
How can I identify jar files in taskdef / usr / share / lib or to symlink everything in my project's local lib directory to $ ANT_HOME / lib How can i get it without Finally, able to successfully generate a WSDL from 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 still highly appreciate if someone can tell me what I am doing wrong in not being able to define those libraries in build.xml
In general, it works but you can You need to be careful about which category of
If your Task Class can be loaded up in a Classloader in Classloader hierarchy (like Classspace or ANHHAM / Lib), your classpath can easily Ignored
Read more for more information.
Ant class loader uses the implementation
Class loader uses a delegation to search for class classes and resources. Each example of Classloader has an associated parent class loader. When asked to find a class or resource, class louder will represent a Class or a Search for Resource class class before its class class or resource, before attempting to find it. The built-in class loader of the virtual machine, called the bootstrap class loader, is not itself a parent but can serve as the guardian of the Classloader instance.
Note: Running ant-diagnosis
.
Comments
Post a Comment