blob: 132d7cb21cf397554ce949ea5deaf7bd78e7f729 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../skin/tigris.css" type="text/css">
<link rel="stylesheet" href="../../skin/mysite.css" type="text/css">
<link rel="stylesheet" href="../../skin/site.css" type="text/css">
<link media="print" rel="stylesheet" href="../../skin/print.css" type="text/css">
<title>WebServices - Axis</title>
</head>
<body bgcolor="white" class="composite">
<div id="banner">
<table width="100%" cellpadding="0" cellspacing="0" summary="banner" border="0">
<tbody>
<tr>
<td align="left">
<div class="groupLogo">
<a href="http://ws.apache.org/"><img border="0" class="logoImage" alt="The Apache WebServices Project" src="../../images/project-logo.png"></a>
</div>
</td><td nowrap="1" width="100%" align="left">
<div class="projectTitleImg">
<br>
<a href=""><img border="0" class="logoImage" alt="Web Services - Axis" src="../../images/wsaxis.png"></a>
</div>
</td><td align="right">
<div class="projectLogo">
<a href="http://ws.apache.org/axis/"><img border="0" class="logoImage" alt="The Apache Axis Project" src="../../images/axis3.jpg"></a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<table width="100%" cellpadding="0" cellspacing="0" border="0" summary="nav" id="breadcrumbs">
<tbody>
<tr class="status">
<td width="100%">&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.apache.org/">Apache</a> | <a href="http://ws.apache.org/">Web Services</a> | <a href="http://ws.apache.org/axis/">Axis</a></td><td nowrap="1" align="right">
<form method="get" action="http://www.google.com/search" target="_blank">Search <input type="hidden" name="sitesearch" value="ws.apache.org"><input type="text" id="query" name="q" size="10"><img class="spacer" src="skin/images/spacer.gif" alt="" width="5" height="1"><input type="submit" value="Go" name="Search">
</form>
</td>
</tr>
</tbody>
</table>
<table id="main" width="100%" cellpadding="8" cellspacing="0" summary="" border="0">
<tbody>
<tr valign="top">
<td id="leftcol">
<div id="navcolumn">
<div class="menuBar">
<div class="menu">
<span class="menuLabel">Axis</span>
<div class="menuItem">
<a href="../../index.html">Introduction</a>
</div>
<div class="menuItem">
<a href="../../news.html">News</a>
</div>
<div class="menuItem">
<a href="http://wiki.apache.org/ws/FrontPage/Axis">FAQ/Wiki</a>
</div>
<div class="menu">
<span class="menuLabel">Get Involved</span>
<div class="menuItem">
<a href="../../overview.html">Overview</a>
</div>
<div class="menuItem">
<a href="../../cvs.html">SVN Repository</a>
</div>
<div class="menuItem">
<a href="../../mail.html">Mailing Lists</a>
</div>
<div class="menuItem">
<a href="../../ref.html">Reference Library</a>
</div>
<div class="menuItem">
<a href="../../bugs.html">Bugs</a>
</div>
<div class="menuItem">
<a href="../../howtobuild.html">HowToBuildSite</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">Axis (Java)</span>
<div class="menuItem">
<a href="../../java/index.html">Documentation</a>
</div>
<div class="menuItem">
<a href="../../java/releases.html">Releases</a>
</div>
<div class="menuItem">
<a href="../../java/install.html">Installation</a>
</div>
<div class="menuItem">
<a href="../../java/user-guide.html">User's Guide</a>
</div>
<div class="menuItem">
<a href="../../java/developers-guide.html">Developer's Guide</a>
</div>
<div class="menuItem">
<a href="../../java/integration-guide.html">Integration Guide</a>
</div>
<div class="menuItem">
<a href="../../java/architecture-guide.html">Architecture Guide</a>
</div>
<div class="menuItem">
<a href="../../java/reference.html">Reference Guide</a>
</div>
<div class="menuItem">
<a href="../../java/reading.html">Reading Guide</a>
</div>
<div class="menuItem">
<a href="../../java/requirements.html">Requirements</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">Axis C++</span>
<div class="menuItem">
<a href="http://ws.apache.org/axis/cpp/index.html">Home</a>
</div>
<div class="menuItem">
<a href="http://ws.apache.org/axis/cpp/documentation.html">Documentation</a>
</div>
<div class="menuItem">
<a href="http://ws.apache.org/axis/cpp/download.html">Download</a>
</div>
<div class="menuItem">
<a href="http://wiki.apache.org/ws/FrontPage/AxisCPP">Wiki Pages</a>
</div>
<div class="menuItem">
<a href="http://ws.apache.org/axis/cpp/who.html">Who we are</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">Downloads</span>
<div class="menuItem">
<a href="../../interim.html">Interim Drops</a>
</div>
<div class="menuItem">
<a href="http://svn.apache.org/viewcvs.cgi/webservices/axis/trunk/">Source Code</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">Translation</span>
<div class="menuItem">
<a href="http://ws.apache.org/axis/ja/index.html">Japanese</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">Related Projects</span>
<div class="menuItem">
<a href="http://ws.apache.org/wsif/">WSIF</a>
</div>
<div class="menuItem">
<a href="http://ws.apache.org/juddi/">jUDDI</a>
</div>
<div class="menuItem">
<a href="http://wsdl4j.sourceforge.net">WSDL4J</a>
</div>
<div class="menuItem">
<a href="http://www.uddi4j.org/">UDDI4J</a>
</div>
</div>
<div class="menu">
<span class="menuLabel">Misc</span>
<div class="menuItem">
<a href="../../who.html">Who we are</a>
</div>
<div class="menuItem">
<a href="../../contact.html">Contact</a>
</div>
<div class="menuItem">
<a href="../../legal.html">Legal</a>
</div>
<div class="menuItem">
<a href="../../docs.html">Notes/Docs</a>
</div>
</div>
</div>
</div>
</div>
</td><td>
<div id="bodycol">
<div class="app">
<div class="h3">
<div class="h3">
<h3>Axis-wsdl2java Task</h3>
</div>
<p>Create Java classes from local or remote WSDL.</p>
<div class="h4">
<h4>Description</h4>
</div>
<p>Create Java classes from local or remote WSDL. Mappings from namespaces to packages can be provided as nested &lt;mapping&gt; elements.</p>
<p>Proxy settings are taken from the java runtime settings of http.ProxyHost, http.ProxyPort, etc. The Ant task &lt;setProxy&gt; can set these. As well as the nested mapping elements, this task uses the file <span class="codefrag">NStoPkg.properties</span> in the project base directory for namespace mapping</p>
<p>This task does no dependency checking; files are generated whether they need to be or not. The exception to this is the Impl class, which is not
overwritten if it exists. This is a safety measure. However, all other classes are generated overwriting anything that exists.</p>
<p>The safe way to use this task is to have it generate the java source in a build directory, then have a &lt;copy&gt; task selectively copy the files you need into a safe location. Again, copying into the source tree is dangerous, but a separate build/src tree is safe. Then include this separate tree in the &lt;javac&gt; task's src attribute to include it in the build. Implement your own implementation classes of the server stub and the test cases using the generated templates. If you want to add methods to autogenerated data types, consider subclassing them, or write helper classes.</p>
<p>Tip: if you &lt;get&gt; the wsdl, and use the &lt;filesmatch&gt; condition to compare the fetched wsdl with a catched copy, you can make the target that calls the axis-wsd2ljava task conditional on the WSDL having changed. This stops spurious code regeneration and follow-on rebuilds across the java source tree.</p>
<div class="h4">
<h4>Parameters</h4>
</div>
<table class="ForrestTable" cellspacing="1" cellpadding="4">
<tr class="b">
<th colspan="1" rowspan="1">Attribute</th>
<th colspan="1" rowspan="1">Description</th>
<th colspan="1" rowspan="1">Type</th>
</tr>
<tr class="a">
<td colspan="1" rowspan="1">all</td>
<td colspan="1" rowspan="1">flag to generate code for all elements, even unreferenced ones default=false;</td>
<td colspan="1" rowspan="1">boolean</td>
</tr>
<tr class="b">
<td colspan="1" rowspan="1">debug</td>
<td colspan="1" rowspan="1">flag for debug output; default=false</td>
<td colspan="1" rowspan="1">boolean</td>
</tr>
<tr class="a">
<td colspan="1" rowspan="1">deployscope</td>
<td colspan="1" rowspan="1">add scope to deploy.xml: "Application", "Request", "Session" optional;</td>
<td colspan="1" rowspan="1">java.lang.String</td>
</tr>
<tr class="b">
<td colspan="1" rowspan="1">factory</td>
<td colspan="1" rowspan="1">name of the Java2WSDLFactory class for extending WSDL generation functions</td>
<td colspan="1" rowspan="1">java.lang.String</td>
</tr>
<tr class="a">
<td colspan="1" rowspan="1">helpergen</td>
<td colspan="1" rowspan="1">Turn on/off Helper class generation; default is false</td>
<td colspan="1" rowspan="1">boolean</td>
</tr>
<tr class="b">
<td colspan="1" rowspan="1">namespacemappingfile</td>
<td colspan="1" rowspan="1">set the mapping file. This is a properties file of package=namespace order. Optional, default is to look for a file called NStoPkg.properties in the project directory.</td>
<td colspan="1" rowspan="1">java.io.File</td>
</tr>
<tr class="a">
<td colspan="1" rowspan="1">noimports</td>
<td colspan="1" rowspan="1">only generate code for the immediate WSDL document, and not imports; default=false;</td>
<td colspan="1" rowspan="1">boolean</td>
</tr>
<tr class="b">
<td colspan="1" rowspan="1">output</td>
<td colspan="1" rowspan="1">output directory for emitted files</td>
<td colspan="1" rowspan="1">java.io.File</td>
</tr>
<tr class="a">
<td colspan="1" rowspan="1">serverside</td>
<td colspan="1" rowspan="1">emit server-side bindings for web service; default=false</td>
<td colspan="1" rowspan="1">boolean</td>
</tr>
<tr class="b">
<td colspan="1" rowspan="1">skeletondeploy</td>
<td colspan="1" rowspan="1">deploy skeleton (true) or implementation (false) in deploy.wsdd. Default is false. Assumes server-side="true".</td>
<td colspan="1" rowspan="1">boolean</td>
</tr>
<tr class="a">
<td colspan="1" rowspan="1">testcase</td>
<td colspan="1" rowspan="1">flag for automatic Junit testcase generation default is false</td>
<td colspan="1" rowspan="1">boolean</td>
</tr>
<tr class="b">
<td colspan="1" rowspan="1">timeout</td>
<td colspan="1" rowspan="1">timeout in milliseconds for URL retrieval; default is 45 seconds. Set this to -1 to disable timeouts altogether: other negative values are not allowed)</td>
<td colspan="1" rowspan="1">long</td>
</tr>
<tr class="a">
<td colspan="1" rowspan="1">typemappingversion</td>
<td colspan="1" rowspan="1">the default type mapping registry to use. Either 1.1 or 1.2. Default is 1.1</td>
<td colspan="1" rowspan="1">org.apache.axis.tools.ant.wsdl.TypeMappingVersionEnum</td>
</tr>
<tr class="b">
<td colspan="1" rowspan="1">url</td>
<td colspan="1" rowspan="1">URL to fetch and generate WSDL for. Can be remote or a local file.</td>
<td colspan="1" rowspan="1">java.lang.String</td>
</tr>
<tr class="a">
<td colspan="1" rowspan="1">verbose</td>
<td colspan="1" rowspan="1">flag for verbose output; default=false</td>
<td colspan="1" rowspan="1">boolean</td>
</tr>
</table>
<div class="h4">
<h4>Parameters as nested elements</h4>
</div>
<p>mapping (org.apache.axis.tools.ant.wsdl.NamespaceMapping)<br>add a mapping of namespaces to packages</p>
<p>mappingset (org.apache.axis.tools.ant.wsdl.MappingSet)<br>add a mapping of namespaces to packages</p>
<div id="pdf" align="right">
<a href="axis-wsdl2java.pdf"><img alt="PDF" src="../../skin/images/pdfdoc.gif" class="skin"><br>
PDF</a>
</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div id="footer">
<table summary="footer" cellspacing="0" cellpadding="4" width="100%" border="0">
<tbody>
<tr>
<td colspan="2">
<div align="center">
<div class="copyright">
Copyright &copy; 2000-2005&nbsp;The Apache Software Foundation. All rights reserved.
</div>
</div>
</td>
</tr>
<tr>
<td align="left"></td><td align="right">
<div align="right">
<div class="credit"></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>