blob: 320d8ef4e8d35869301ce9fe9abc0fad8ce1252d [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia at 2015-07-03
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20150703" />
<meta http-equiv="Content-Language" content="en" />
<title>Ant Tasks &#x2013; About</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
</head>
<body class="topBarDisabled">
<div class="container-fluid">
<div id="banner">
<div class="pull-left">
<div id="bannerLeft">
<h2>Ant Tasks</h2>
</div>
</div>
<div class="pull-right"> <a href=".." id="bannerRight">
<img src="../images/axis-small.png" alt="Apache Axis"/>
</a>
</div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li class="">
<a href="http://www.apache.org/" class="externalLink" title="Apache">
Apache</a>
</li>
<li class="divider ">/</li>
<li class="">
<a href="../../../" title="Axis">
Axis</a>
</li>
<li class="divider ">/</li>
<li class="">
<a href="../../" title="Axis 1.x">
Axis 1.x</a>
</li>
<li class="divider ">/</li>
<li class="">
<a href="../" title="Java">
Java</a>
</li>
<li class="divider ">/</li>
<li class="">
<a href="./" title="Ant Tasks">
Ant Tasks</a>
</li>
<li class="divider ">/</li>
<li class="">About</li>
<li id="publishDate" class="pull-right">Last Published: 2015-07-03</li> <li class="divider pull-right">|</li>
<li id="projectVersion" class="pull-right">Version: 1.4.1-SNAPSHOT</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Overview</li>
<li class="active">
<a href="#"><i class="none"></i>Introduction</a>
</li>
<li>
<a href="dependencies.html" title="Dependencies">
<i class="none"></i>
Dependencies</a>
</li>
<li class="nav-header">Tasks</li>
<li>
<a href="axis-admin.html" title="axis-admin">
<i class="none"></i>
axis-admin</a>
</li>
<li>
<a href="axis-java2wsdl.html" title="axis-java2wsdl">
<i class="none"></i>
axis-java2wsdl</a>
</li>
<li>
<a href="axis-wsdl2java.html" title="axis-wsdl2java">
<i class="none"></i>
axis-wsdl2java</a>
</li>
<li>
<a href="foreach.html" title="foreach">
<i class="none"></i>
foreach</a>
</li>
<li>
<a href="runaxisfunctionaltests.html" title="runaxisfunctionaltests">
<i class="none"></i>
runaxisfunctionaltests</a>
</li>
<li class="nav-header">Apache</li>
<li>
<a href="http://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink" title="License">
<i class="none"></i>
License</a>
</li>
<li>
<a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
<i class="none"></i>
Sponsorship</a>
</li>
<li>
<a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks">
<i class="none"></i>
Thanks</a>
</li>
<li>
<a href="http://www.apache.org/security/" class="externalLink" title="Security">
<i class="none"></i>
Security</a>
</li>
</ul>
<form id="search-form" action="http://www.google.com/search" method="get" >
<input value="ws.apache.org/axis/java" name="sitesearch" type="hidden"/>
<input class="search-query" name="q" id="query" type="text" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=search-form"></script>
<hr class="divider" />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
</a>
</div>
</div>
</div>
<div id="bodyColumn" class="span9" >
<!-- ~ 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. -->
<div class="section">
<h2><a name="Introduction"></a>Introduction</h2>
<p>Axis comes with Ant tasks to automate aspects of the build process inside ant. To use these tasks, you need</p>
<ol style="list-style-type: decimal">
<li><a class="externalLink" 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>
</div>
<div class="section">
<h2><a name="Declaring_the_Tasks"></a>Declaring the Tasks</h2>
<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>
<div class="source">
<pre>&lt;path id=&quot;axis.classpath&quot;&gt;
&lt;fileset dir=&quot;${axis.home}/build/lib&quot;&gt;
&lt;include name=&quot;**/*.jar&quot; /&gt;
&lt;/fileset&gt;
&lt;/path&gt;</pre></div>
<p>Then use the <tt>&lt;taskdef&gt;</tt> declaration to declare all the tasks listed in a properties file inside the <tt>axis-ant.jar</tt> file:</p>
<div class="source">
<pre>&lt;taskdef resource=&quot;axis-tasks.properties&quot;
classpathref=&quot;axis.classpath&quot; /&gt;</pre></div>
</div>
<div class="section">
<h2><a name="Creating_Java_files_from_WSDL"></a>Creating Java files from WSDL</h2>
<p>This uses the <a href="axis-wsdl2java.html">&lt;axis-wsdl2java&gt;</a> task.</p>
<div class="source">
<pre>&lt;axis-wsdl2java
output=&quot;${generated.dir}&quot;
testcase=&quot;true&quot;
verbose=&quot;true&quot;
url=&quot;${local.wsdl}&quot; &gt;
&lt;mapping
namespace=&quot;http://axis.apache.org/ns/interop&quot;
package=&quot;interop&quot; /&gt;
&lt;/axis-wsdl2java&gt;</pre></div>
<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>
</div>
<div class="section">
<h2><a name="Creating_WSDL_files_from_Java"></a>Creating WSDL files from Java</h2>
<p>This uses the <a href="axis-java2wsdl.html">&lt;axis-java2wsdl&gt;</a> task.</p>
</div>
<div class="section">
<h2><a name="Talking_to_the_admin_service"></a>Talking to the admin service</h2>
<p>This can be done with the <a href="axis-admin.html">&lt;axis-admin&gt;</a> task.</p>
<div class="source">
<pre>&lt;axis-admin
port=&quot;${target.port}&quot;
hostname=&quot;${target.server}&quot;
failonerror=&quot;true&quot;
servletpath=&quot;${target.appname}/services/AdminService&quot;
debug=&quot;true&quot;
xmlfile=&quot;${endpoint-stub.wsdd}&quot;
/&gt;</pre></div>
<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>
</div>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row span12">Copyright &copy; 2000-2015
<a href="http://www.apache.org/">The Apache Software Foundation</a>.
All Rights Reserved.
</div>
</div>
</footer>
</body>
</html>