Recently, I had to call webservices from a java GUI application. To do this I used Apache AXIS to generate STUB and Skeleton classes from the webservices WSDL files. In this posting, I will explain how I have invoked the WSDL2Java from a build.xml file to automate the generation of the stub and skeleton classes for the webservices. Note that you have to download Apache Axis distribution and install it locally.
First you have to set a path variable in your build file to locate the AXIS libraries. Note that all the AXIS libraries are in this path!
<path id="axis.classpath">
<fileset dir="${lib.to-compile-local.dir}/axis">
<include name="**/*.jar" />
</fileset>
</path>
Secondly, you define the resource file with task definitions:
<taskdef resource="axis-tasks.properties"
classpathref="axis.classpath" />
Now you can use the specific task to generate the java stub and skeleton classes from the appropriate WSDL files. Note that you can just point to an URL and that the output dir can be used twice and is not overwritten each time..
<target name="make-axis">
<axis-wsdl2java
output="${axis.generated.dir}"
verbose="true"
url="${url1}" >
</axis-wsdl2java>
<axis-wsdl2java
output="${axis.generated.dir}"
verbose="true"
url="${url2}" >
</axis-wsdl2java>
</target>
A colleque will explain soon on this blog how to use the generated stub and skeleton classes to call the webservices from Java.

September 26th, 2005 at 11:43:05
[...] sses first have to be generated. Tom has described how to do this using Axis in an earlier blog Note that in this example only the generated PortTy [...]
December 14th, 2006 at 17:40:54
Hi!
I wonder… You write that
“A colleque will explain soon on this blog how to use the generated stub and skeleton classes to call the webservices from Java.”
Will this be anytime soon? Guess what I am about to do right now?
Cheers,
/JMK
December 28th, 2006 at 07:18:12
Issue:
We had two WSDD files.
1.deploy.wsdd (generated while WSDL is converted to java).
2.Server-config.wsdd.
We have to copy replace some (two) tags in server-config.wsdd with two tags in deploy.wsdd.
The names of the two tags are same in both files.
We have to write the script for this task in build.xml.
Can any one help me in writing this script?
July 19th, 2008 at 02:32:33
Nice one!!
Thanks a lot!
Can neone temme how do I check out directly from CVS…any .sh scripts??