Starting from a WSDL:
-------------------
Step 1 : Generate your server code.
-----------------------------------
When you have a wsdl, the first step you do is use the
following ant target to read in a config.xml and
generate your server code. ( you can also use the
provided ant targets. )
<target name="generate-server" depends="compile-classes">
<exec executable="${wscompile}">
<arg line="-import"/>
<arg line="-keep"/>
<arg line="-d ${build.home}/classes/server"/>
<arg line="-classpath ${build.home}/classes/server"/>
<arg line="-model ${build.home}/model.Z"/>
<arg line="${wscompile.config.file}"/>
</exec>
</target>
Example of config.xml
=====================
<?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns="
http://java.sun.com/xml/ns/jax-rpc/ri/config">
<wsdl
location="etc/HelloWorldService.wsdl"
packageName="hello" />
</configuration>
Step 2 : Create a raw war file.
-------------------------------
The following is an example of an ant target which allows you
to create a raw.war file.
<target name="create-war" depends="generate-server">
<war warfile="${build.home}/${webapp.raw.name}.war"
webxml="${webapp.webxml}">
<webinf dir="${webapp.jaxrpc.dir}" includes="${webapp.jaxrpc.file}" defaultexcludes="
no"/>
<webinf dir="${build.home}" includes="model.Z" defaultexcludes="no"/>
<classes dir="${build.home}/classes/server" includes="**/*.class" defaultexcludes="no
"/>
</war>
</target>
Step 3: Create a deployable war file.
-------------------------------------
The following ant target is an example of creating a
deployable war file using wsdeploy.sh. ( you can also use
the provided ant targets )
<target name="do-process-war" depends="create-war" unless="already-processed">
<exec executable="${wsdeploy}">
<arg line="-keep"/>
<arg line="-tmpdir"/>
<arg line="${build.home}/generated"/>
<arg line="-o"/>
<arg line="${build.home}/${webapp.name}.war"/>
<arg line="${build.home}/${webapp.raw.name}.war"/>
</exec>
</target>
Step 4 : Move the war into the webapps dir of Tomcat
-----------------------------------------------------
And dont forget to restart tomcat.