1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
<html>
<title>Axis Ant Tasks</title>
<link href="../axis.css" rel=stylesheet type=text/css>
<body>
<h1>Axis Ant Tasks</h1>
Axis comes with Ant tasks to automate aspects of the
build process inside ant. To use these tasks, you need
<ol>
<li>
<A href="http://jakarta.apache.org/ant">Apache Ant 1.5.1 or later</A>
</li>
<li>
The library <tt>axis-ant.jar</tt> which contains the tasks
</li>
<li>
All the main Axis libraries
</li>
</ol>
<h3>Declaring the Tasks</h3>
To declare the tasks, set up a classpath to include the axis task JAR and
all the dependent libraries. Including everything in the axis lib directory
should suffice
<p>
<pre><path id="axis.classpath">
<fileset dir="${axis.home}/build/lib">
<include name="**/*.jar" />
</fileset>
</path>
</pre>
Then use the <tt><taskdef></tt> declaration to declare all the tasks listed
in a properties file inside the <tt>axis-ant.jar</tt> file:
<p>
<pre><taskdef resource="axis-tasks.properties"
classpathref="axis.classpath" />
</pre>
<h3>Creating Java files from WSDL</h3>
This uses the <a href="axis-wsdl2java.html"><axis-wsdl2java></a> task.
<p>
<pre><axis-wsdl2java
output="${generated.dir}"
testcase="true"
verbose="true"
url="${local.wsdl}" >
<mapping
namespace="http://axis.apache.org/ns/interop"
package="interop" />
</axis-wsdl2java>
</pre>
The mapping elements are used to list the mappings from XML namespaces to
Java packages; you can include as many as you need.
<h3>Creating WSDL files from Java</h3>
This uses the <a href="axis-java2wsdl.html"><axis-java2wsdl></a> task.
<h3>Talking to the admin service</h3>
This can be done with the
<a href="axis-admin.html"><axis-admin></a> task.
<p>
<pre><axis-admin
port="${target.port}"
hostname="${target.server}"
failonerror="true"
servletpath="${target.appname}/services/AdminService"
debug="true"
xmlfile="${endpoint-stub.wsdd}"
/>
</pre>
Here the target.* properties are pulled from a properties file for the
system being deployed to, so a single build file can deploy to different
systems with ease.
</body>
</html>
|