﻿<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements. See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership. The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License. You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied. See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<document xmlns="http://maven.apache.org/XDOC/2.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
  <properties>
    <title>About</title>
  </properties>
  <body>

<section name="Introduction">

<p>Axis comes with Ant tasks to automate aspects of the build process inside ant. To use these tasks, you need</p>

<ol>
  <li><a href="http://jakarta.apache.org/ant">Apache Ant 1.5.1 or later</a></li>
  <li>The library <code>axis-ant.jar</code> which contains the tasks</li>
  <li>All the main Axis libraries</li>
</ol>

</section>

<section name="Declaring the Tasks">

<p>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>

<source>&lt;path id="axis.classpath"&gt;
  &lt;fileset dir="${axis.home}/build/lib"&gt;
    &lt;include name="**/*.jar" /&gt;
  &lt;/fileset&gt;
&lt;/path&gt;</source>

<p>Then use the <code>&lt;taskdef&gt;</code> declaration to declare all the tasks listed in a properties file inside the <code>axis-ant.jar</code> file:</p>
<source>&lt;taskdef resource="axis-tasks.properties"
  classpathref="axis.classpath" /&gt;</source>

</section>

<section name="Creating Java files from WSDL">

<p>This uses the <a href="axis-wsdl2java.html">&lt;axis-wsdl2java&gt;</a> task.</p>
<source>&lt;axis-wsdl2java
  output="${generated.dir}"
  testcase="true"
  verbose="true"
  url="${local.wsdl}" &gt;
    &lt;mapping
      namespace="http://axis.apache.org/ns/interop"
      package="interop" /&gt;
  &lt;/axis-wsdl2java&gt;</source>

<p>The mapping elements are used to list the mappings from XML namespaces to Java packages; you can include as many as you need.</p>

</section>

<section name="Creating WSDL files from Java">

<p>This uses the <a href="axis-java2wsdl.html">&lt;axis-java2wsdl&gt;</a> task.</p>

</section>

<section name="Talking to the admin service">

<p>This can be done with the <a href="axis-admin.html">&lt;axis-admin&gt;</a> task.</p>
<source>&lt;axis-admin
    port="${target.port}"
    hostname="${target.server}"
    failonerror="true"
    servletpath="${target.appname}/services/AdminService"
    debug="true"
    xmlfile="${endpoint-stub.wsdd}"
    /&gt;</source>

<p>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.</p>

</section>

  </body>
</document>
