blob: 05ec22aeba2fe5b262912dcc6a119da7fcf4bd11 [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; Axis-wsdl2java Task</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="">Axis-wsdl2java Task</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>
<a href="ant.html" title="Introduction">
<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 class="active">
<a href="#"><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="Description"></a>Description</h2>
<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 <tt>NStoPkg.properties</tt> 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>
<div class="section">
<h2><a name="Parameters"></a>Parameters</h2>
<table border="0" class="table table-striped">
<tr class="a">
<th>Attribute</th>
<th>Description</th>
<th>Type</th>
</tr>
<tr class="b">
<td>all</td>
<td>flag to generate code for all elements, even unreferenced ones default=false;</td>
<td>boolean</td>
</tr>
<tr class="a">
<td>debug</td>
<td>flag for debug output; default=false</td>
<td>boolean</td>
</tr>
<tr class="b">
<td>deployscope</td>
<td>add scope to deploy.xml: &quot;Application&quot;, &quot;Request&quot;, &quot;Session&quot; optional;</td>
<td>String</td>
</tr>
<tr class="a">
<td>factory</td>
<td>name of the Java2WSDLFactory class for extending WSDL generation functions</td>
<td>String</td>
</tr>
<tr class="b">
<td>failonnetworkerrors</td>
<td>should the task fail the build if there is a network error? optional: defaults to false</td>
<td>boolean</td>
</tr>
<tr class="a">
<td>helpergen</td>
<td>Turn on/off Helper class generation; default is false</td>
<td>boolean</td>
</tr>
<tr class="b">
<td>namespacemappingfile</td>
<td>set the mapping file. This is a properties file of namespace=package order. Optional, default is to look for a file called NStoPkg.properties in the project directory.</td>
<td>File</td>
</tr>
<tr class="a">
<td>noimports</td>
<td>only generate code for the immediate WSDL document, and not imports; default=false;</td>
<td>boolean</td>
</tr>
<tr class="b">
<td>nowrapped</td>
<td>Set the noWrapped flag.</td>
<td>boolean</td>
</tr>
<tr class="a">
<td>output</td>
<td>output directory for emitted files</td>
<td>File</td>
</tr>
<tr class="b">
<td>password</td>
<td>set any password required for BASIC authenticated access to the WSDL; optional; only used if username is set</td>
<td>String</td>
</tr>
<tr class="a">
<td>printstacktraceonfailure</td>
<td>should we print a stack trace on failure? Optional, default=true.</td>
<td>boolean</td>
</tr>
<tr class="b">
<td>protocolhandlerpkgs</td>
<td>append any protocol handler pkgs specified with the task</td>
<td>String</td>
</tr>
<tr class="a">
<td>serverside</td>
<td>emit server-side bindings for web service; default=false</td>
<td>boolean</td>
</tr>
<tr class="b">
<td>skeletondeploy</td>
<td>deploy skeleton (true) or implementation (false) in deploy.wsdd. Default is false. Assumes server-side=&quot;true&quot;.</td>
<td>boolean</td>
</tr>
<tr class="a">
<td>testcase</td>
<td>flag for automatic Junit testcase generation default is false</td>
<td>boolean</td>
</tr>
<tr class="b">
<td>timeout</td>
<td>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>long</td>
</tr>
<tr class="a">
<td>typemappingversion</td>
<td>the default type mapping registry to use. Either 1.1 or 1.2. Default is 1.1</td>
<td>&quot;1.1&quot;, &quot;1.2&quot;</td>
</tr>
<tr class="b">
<td>url</td>
<td>URL to fetch and generate WSDL for. Can be remote or a local file.</td>
<td>String</td>
</tr>
<tr class="a">
<td>username</td>
<td>set any username required for BASIC authenticated access to the WSDL; optional.</td>
<td>String</td>
</tr>
<tr class="b">
<td>verbose</td>
<td>flag for verbose output; default=false</td>
<td>boolean</td>
</tr>
<tr class="a">
<td>allowInvalidURL</td>
<td>flag used to allow Stub generation even if WSDL endpoint URL is not a valid URL. It's the responsibility of the user to update the endpoint value before using generated classes; default=false</td>
<td>boolean</td>
</tr>
<tr class="b">
<td>implementationClassName</td>
<td>Set the name of the implementation class. Especially useful when exporting an existing class as a web service using java2wsdl followed by wsdl2java.</td>
<td>String</td>
</tr>
</table>
</div>
<div class="section">
<h2><a name="Parameters_as_nested_elements"></a>Parameters as nested elements</h2>
<dl>
<dt>mapping (org.apache.axis.tools.ant.wsdl.NamespaceMapping)</dt>
<dd>add a mapping of namespaces to packages</dd>
<dt>mappingset (org.apache.axis.tools.ant.wsdl.MappingSet)</dt>
<dd>add a mapping of namespaces to packages</dd>
<dt>classpath (org.apache.tools.ant.types.Path)</dt>
<dd>set the classpath</dd>
<dt>nsexclude (org.apache.axis.wsdl.toJava.NamespaceSelector)</dt>
<dd>Adds an additional namespace to the list to be excluded from source code generation.</dd>
<dt>nsinclude (org.apache.axis.wsdl.toJava.NamespaceSelector)</dt>
<dd>Adds an additional namespace to the list to be included in source code generation.</dd>
<dt>property (org.apache.axis.wsdl.toJava.FactoryProperty)</dt>
<dd>Adds a property name/value pair for specialized JavaGeneratorFactories.</dd>
</dl>
</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>