You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2008/05/01 23:20:38 UTC

svn commit: r652665 [41/45] - in /webservices/axis2/site: ./ 1_4/ 1_4/adb/ 1_4/adb/images/ 1_4/images/ 1_4/images/archi-guide/ 1_4/images/userguide/ 1_4/jibx/ 1_4/src/ css/ download/0_9/ download/0_91/ download/0_92/ download/0_93/ download/0_94/ downl...

Modified: webservices/axis2/site/tools/1_3/CodegenToolReference.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/tools/1_3/CodegenToolReference.html?rev=652665&r1=652664&r2=652665&view=diff
==============================================================================
--- webservices/axis2/site/tools/1_3/CodegenToolReference.html (original)
+++ webservices/axis2/site/tools/1_3/CodegenToolReference.html Thu May  1 14:20:27 2008
@@ -271,947 +271,947 @@
     </div>
     <div id="bodyColumn">
       <div id="contentBox">
-        <html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta name="generator" content="HTML Tidy for Windows (vers 14 June 2007), see www.w3.org"></meta>
-<meta http-equiv="content-type" content=""></meta>
-Code Generator Tool Guide for Command Line and Ant
-Task
-<link href="../../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></link>
-</head>
-
-<h1>Code Generator Tool Guide for Command Line and Ant Task</h1>
-<p>The Code Generator tool consists of a command line version and
-an Ant Task. This document will list the command line references
-and Ant task references. Also in detail, this document shows how to
-build file using custom Ant task and invoking the Code Generator
-from Ant.</p>
-<p>This tool is bundled with the <a href="http://ws.apache.org/axis2/download.cgi">Axis2 Binary
-Distribution</a>.</p>
-<h2>Content</h2>
-<ul>
-<li><a href="#intro">Introduction</a></li>
-<li><a href="#cmdline">Command Line Version</a>
-<ul>
-<li><a href="#cmdref">Option Reference</a></li>
-</ul>
-</li>
-<li><a href="#ant">Ant Task</a>
-<ul>
-<li><a href="#antref">Ant Task Reference</a></li>
-<li><a href="#example">Example Build File Using the Custom Ant
-Task</a></li>
-<li><a href="#invoking">Invoking the Code Generator From
-Ant</a></li>
-</ul>
-</li>
-<li><a href="#appendix">Appendix</a></li>
-</ul>
-<a name="intro"></a>
-<h2>Introduction</h2>
-This basic tool is implemented by the WSDL2Code class and just
-for the convenience in the case of Java (which would be the
-majority) there is another WSDL2Java class. One can choose to run
-the main classes directly or use one of the scripts to run the
-WSDL2Code and WSDL2Java appropriately. (the scripts are found in
-the bin directory of the <a href="../../download/1_1/download.html#std-bin">Standard Binary
-Distribution</a>)
-<a name="cmdline"></a>
-<h2>Command Line Version</h2>
-For those users who wish to use the command line version of the
-tool, this section will be of value.
-<a name="cmdref"></a>
-<h3>Option Reference</h3>
-Usage WSDL2Code &lt;option_reference&gt;
-<b>E.g. :- WSDL2Code -uri &lt;Location of WSDL&gt;</b>
-<table class="bodyTable">
-<tbody>
-<tr class="a">
-<td><strong>Short Option</strong></td>
-<td><strong>Long Option</strong></td>
-<td><strong>Description</strong></td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-uri &lt;Location of WSDL&gt;</td>
-<td>None</td>
-<td>WSDL file location. This should point to a WSDL
-file in the local file system.</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-o &lt;output Location&gt;</td>
-<td>--output &lt;output Location&gt;</td>
-<td>Output file location. This is where the files would
-be copied once the code generation is done. If this option is
-omitted the generated files would be copied to the working
-directory.</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-l &lt;language&gt;</td>
-<td>--language &lt;language&gt;</td>
-<td>Output language. Currently the code generator can
-generate code in Java but it has the ability to be extended to
-support other languages.</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-p &lt;package name&gt;</td>
-<td>--package &lt;package name&gt;</td>
-<td>The target package name. If omitted, a default
-package (formed using the target namespace of the WSDL) will be
-used.</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-a</td>
-<td>--async</td>
-<td>Generate code only for async style. When this
-option is used the generated stubs will have only the asynchronous
-invocation methods. Switched off by default.</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-s</td>
-<td>--sync</td>
-<td>Generate code only for sync style . When this
-option is used the generated stubs will have only the synchronous
-invocation methods. Switched off by default. When used with the -a
-option, this takes precedence.</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-t</td>
-<td>--test-case</td>
-<td>Generates a test case. In the case of Java it would
-be a JUnit test case.</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-ss</td>
-<td>--server-side</td>
-<td>Generates server side code (i.e. skeletons).
-Default is off.</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-sd</td>
-<td>--service-description</td>
-<td>Generates the service descriptor (i.e. server.xml).
-Default is off. Only valid with -ss, the server side code
-generation option.</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-d &lt;databinding&gt;</td>
-<td>--databinding-method &lt;databinding&gt;</td>
-<td>Specifies the Databinding framework. Valid values
-are xmlbeans, adb, jibx, and none. Default is adb.</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-g</td>
-<td>--generate-all</td>
-<td>Generates all the classes. This option is valid
-only with the -ss (server side code generation) option. When on,
-the client code (stubs) will also be generated along with the
-skeleton.</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-u</td>
-<td>--unpack-classes</td>
-<td>Unpack classes. This option specifies whether to
-unpack the classes and generate separate classes for the
-databinders.</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-sn &lt;service name&gt;</td>
-<td>--service-name &lt;service name&gt;</td>
-<td>Specifies the service name to be code generated. If
-the service name is not specified, then the first service will be
-picked.</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-pn &lt;port name&gt;</td>
-<td>--port-name &lt;port name&gt;</td>
-<td>Specifies the port name to be code generated. If
-the port name is not specified, then the first port (of the
-selected service) will be picked.</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-ns2p</td>
-<td>--namespace2package</td>
-<td>Specifies a comma separated list of namespaces and
-packages where the given package will be used in the place of the
-auto generated package for the relevant namespace. The list will be
-the format of ns1=pkg1,ns2=pkg2.</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-ssi</td>
-<td>--serverside-interface</td>
-<td>Generate an interface for the service
-skeleton.</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-wv</td>
-<td>--wsdl-version</td>
-<td>WSDL Version. Valid Options : 2, 2.0, 1.1</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-S</td>
-<td>--source-folder</td>
-<td>Specify a directory path for generated source</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-R</td>
-<td>--resource-folder</td>
-<td>Specify a directory path for generated resources</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-em</td>
-<td>--external-mapping</td>
-<td>Specify an external mapping file</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-f</td>
-<td>--flatten-files</td>
-<td>Flattens the generated files</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-uw</td>
-<td>--unwrap-params</td>
-<td>Switch on un-wrapping</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-xsdconfig</td>
-<td></td>
-<td>Use XMLBeans .xsdconfig file. Valid only with -d xmlbeans</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-ap</td>
-<td>--all-ports</td>
-<td>Generate code for all ports</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-or</td>
-<td>--over-ride</td>
-<td>Overwrite the existing classes</td>
-<td></td>
-</tr>
-<tr class="a">
-<td>-b</td>
-<td>--backword-compatible</td>
-<td>Generate Axis 1.x backword compatible code</td>
-<td></td>
-</tr>
-<tr class="b">
-<td>-sp</td>
-<td>--suppress-prefixes</td>
-<td>Suppress namespace prefixes (Optimzation that reduces size of soap request/response)</td>
-<td></td>
-</tr>
-<tr class="a">
-<td></td>
-<td>--noBuildXML</td>
-<td>Don't generate the build.xml in the output directory</td>
-<td></td>
-</tr>
-<tr class="b">
-<td></td>
-<td>--noWSDL</td>
-<td>Don't generate WSDL's in the resources directory</td>
-<td></td>
-</tr>
-<tr class="a">
-<td></td>
-<td>--noMessageReceiver</td>
-<td>Don't generate a MessageReceiver in the generated sources</td>
-<td></td>
-</tr>
-</tbody>
-</table>
-Apart from these mentioned options one can pass extra options by
-prefixing them with -E (uppercase). These extra options will be
-processed by the extensions. The extra options that can be passed
-are documented separately with the extensions documentation (For
-example with ADB).
-<a name="ant"></a>
-<h2>Ant Task</h2>
-The code generator also comes bundled with an Ant task. The ant
-task is implemented by the org.apache.axis2.tool.ant.AntCodegenTask
-class. Following are the ant task attributes.
-<a name="antref"></a>
-<h3>Ant Task Reference</h3>
-<table class="bodyTable">
-<tbody>
-<tr class="b">
-<td>wsdlfilename</td>
-<td>WSDL file location. Maps to the -uri option of the command line
-tool.</td>
-</tr>
-<tr class="a">
-<td>output</td>
-<td>Output file location. This is where the files would be copied
-once the code generation is done. If this option is omitted the
-generated files would be copied to the working directory. Maps to
-the -o option of the command line tool.</td>
-</tr>
-<tr class="b">
-<td>language</td>
-<td>Output language. Currently the code generator can generate code
-in Java. Maps to the -l option of the command line tool.</td>
-</tr>
-<tr class="a">
-<td>packageName</td>
-<td>The target package name. If omitted, a default package (formed
-using the target namespace of the WSDL) will be used. Maps to the
--p option of the command line tool.</td>
-</tr>
-<tr class="b">
-<td>databindingName</td>
-<td>Data binding framework name. Maps to the -d option of the
-command line tool. Possible values include &quot;adb&quot;, &quot;xmlbeans&quot;,
-&quot;jibx&quot;.</td>
-</tr>
-<tr class="a">
-<td>serviceName</td>
-<td>The name of the service in the case of multiple services. Maps
-to -sn options of the command line tool.</td>
-</tr>
-<tr class="b">
-<td>portName</td>
-<td>The name of the port in the presence of multiple ports. Maps to
--pn options of the command line tool.</td>
-</tr>
-<tr class="a">
-<td>asyncOnly</td>
-<td>Generate code only for async style. When this option is used
-the generated stubs will have only the asynchronous invocation
-methods. Defaults to false if omitted. Only true and false are
-applicable as values. Maps to the -a option of the command line
-tool.</td>
-</tr>
-<tr class="b">
-<td>syncOnly</td>
-<td>Generate code only for sync style. When this option is used the
-generated stubs will have only the synchronous invocation methods.
-Defaults to false if omitted. Only true and false are applicable as
-values. Maps to the -s option of the command line tool.</td>
-</tr>
-<tr class="a">
-<td>serverSide</td>
-<td>Generates server side code (i.e. skeletons). Only true and
-false are applicable as values. Default is false. Maps to the -ss
-option of the command line tool.</td>
-</tr>
-<tr class="b">
-<td>testcase</td>
-<td>Generates a test case. Possible values are true and false. Maps
-to the -t options of the command line tool.</td>
-</tr>
-<tr class="a">
-<td>generateServiceXml</td>
-<td>Generates server side code (i.e. skeletons). Only true and
-false are applicable as values. Default is false. Maps to the -sd
-option of the command line tool.</td>
-</tr>
-<tr class="b">
-<td>unpackClasses</td>
-<td>Unpacks the generated classes. This forces the databinding
-classes to be generated separately, which otherwise would have been
-generated as inner classes.</td>
-</tr>
-<tr class="a">
-<td>generateAllClasses</td>
-<td>Generates all the classes including client and server side
-code. Maps to the -g option of the command line tool.</td>
-</tr>
-<tr class="b">
-<td>namespaceToPackages</td>
-<td>A list of namespace to package mappings.</td>
-</tr>
-<tr class="a">
-<td>serverSideInterface</td>
-<td>Flag stating whether to generate an interface for the server
-side skeleton.</td>
-</tr>
-<tr class="b">
-<td>repositoryPath</td>
-<td>Sets the repository path to be used. Maps to the -r option of
-the command line tool.</td>
-</tr>
-<tr class="a">
-<td>wsdlVersion</td>
-<td>Sets the version of the wsdl that is being used during
-codegeneration. This deafults to 1.1 and one can set this to 2,
-when trying to work with a WSDL 2.0 document. Maps to the -wv
-option of the command line tool.</td>
-</tr>
-<tr class="b">
-<td>externalMapping</td>
-<td>Location of the external mapping file to be used. Maps to the
--em option of the command line tool.</td>
-</tr>
-<tr class="a">
-<td>targetSourceFolderLocation</td>
-<td>Rather than dumping all the code in the same location, one has
-the option to make the sources to be generated in a different
-location, given using this option. Maps to the -S option of the
-command line tool.</td>
-</tr>
-<tr class="b">
-<td>targetResourcesFolderLocation</td>
-<td>Rather than dumping all the code in the same location, one has
-the option to make the resources to be generated in a different
-location, given using this option. Maps to the -R option of the
-command line tool.</td>
-</tr>
-<tr class="a">
-<td>unwrap</td>
-<td>This will select between wrapped and unwrapped during code
-generation. Default is set to false. Maps to the -uw option of the
-command line tool.</td>
-</tr>
-</tbody>
-</table>
-<a name="example"></a>
-<h3>Example Build File Using the Custom Ant Task</h3>
-Following is an example ant build file that uses the custom Ant
-task. You can use any wsdl file to test the example. Replace the
-&quot;CombinedService.wsdl&quot; with the name of your wsdl file in the
-following script.
-<pre>
-1 &lt;?xml version=&quot;1.0&quot;?&gt;
-    2 &lt;project name=&quot;CodegenExample&quot; default=&quot;main&quot; basedir=&quot;.&quot;&gt;
-    3
-    4 &lt;path id=&quot;example.classpath&quot;&gt;
-    5 &lt;fileset dir=&quot;classes&quot;&gt;
-    6 &lt;include name=&quot;**/*.jar&quot; /&gt;
-    7 &lt;/fileset&gt;
-    8 &lt;/path&gt;
-    9
-    10 &lt;target name=&quot;declare&quot; &gt;
-    11 &lt;taskdef name=&quot;codegen&quot;
-    12 classname=&quot;org.apache.axis2.tool.ant.AntCodegenTask&quot;
-    13 classpathref=&quot;example.classpath&quot;/&gt;
-    15 &lt;/target&gt;
-    16
-    17 &lt;target name=&quot;main&quot; depends=&quot;declare&quot;&gt;
-    18 &lt;codegen
-    19 wsdlfilename=&quot;C:\test\wsdl\CombinedService.wsdl&quot;
-    20 output=&quot;C:\output&quot;
-    21 serverside=&quot;true&quot;
-    22 generateservicexml=&quot;true&quot;/&gt;
-    23 &lt;/target&gt;
-    24
-    25 &lt;/project&gt;
-</pre>
-In the above build script, from line 4 to 8 it sets the
-classpath and includes all the .jar files (which are listed below)
-into the classpath. From line 10 to 15 it creates a target to
-declare a task called &quot;codegen&quot; and sets the appropriate class
-(org.apache.axis2.tool.ant.AntCodegenTask) within the classpath in
-line 12. From line 17 to 23 it creates the &quot;main&quot; target to
-generate the code from the given wsdl. There are some arguments set
-form line 19 to 22. Here in line 19 it sets the location of the
-wsdl. In line 20 it sets the output directory in which the code is
-generated. Line 21 indicates that this build generates the server
-side code(skeleton) and line 22 indicates that the services.xml is
-also generated.
-<p>Notice the main target that uses the &quot;codegen&quot; task which will
-use the org.apache.axis2.tool.ant.AntCodegenTask class and run the
-code generation tool internally while passing the relevant
-arguments and do the proper generation. If a user types</p>
-<p><code>&gt;ant</code> or <code>&gt;ant main</code></p>
-<p>it will generate the server side code and services.xml for the
-given WSDL file (C:\test\wsdl\CombinedService.wsdl -in the above
-instance) and the generated code will be written to the specified
-output path (C:\output - in the above instance).</p>
-<p>For this Ant task to work the following jars need to be in the
-class path.</p>
-<ul>
-<li>axis2-*.jar (from the Axis2 distribution)</li>
-<li>wsdl4j-1.6.2.jar or higher (The WSDL4J implementation jar.
-Bundled with the Axis2 distribution)</li>
-<li>stax-api-1.0.1.jar (The StAX API's that contain the
-javax.xml.namespace.QName class. This jar may be replaced by any
-other jar that contains the javax.xml.namespace.QName
-implementation. However Axis2 uses this class from the
-stax-api-1.0.1.jar which comes bundled with the Axis2
-distribution)</li>
-<li>commons-logging-1.1.jar, neethi-2.0.jar and XmlSchema-1.2.jar
-(from the Axis2 distribution)</li>
-<li>axiom-api-1.2.1.jar and axiom-impl-1.2.1.jar (from the Axis2
-distribution)</li>
-<li>activation-1.1.jar (from the Axis2 distribution)</li>
-<li>wstx-asl-3.1.0.jar (from the Axis2 distribution)</li>
-</ul>
-<a name="invoking"></a>
-<h3>Invoking the Code Generator From Ant</h3>
-Since the users may find altering their ant class path a bit
-daunting they can also follow an easier technique. The code
-generator main class can be invoked directly through the build
-file.
-Below is an example of a full build.xml needed to run WSDL2Java
-and generate the Java source files, compile the sources, and build
-an AAR file ready for deployment (These are done one by one, by
-calling the targets in the build file separately):
-<pre class="code">
-&lt;!DOCTYPE project&gt;
-
-&lt;project name=&quot;wsdl2java-example&quot; default=&quot;usage&quot; basedir=&quot;.&quot;&gt;
-
-&lt;property name=&quot;project-name&quot; value=&quot;wsdl2java-example&quot;/&gt;
-&lt;property file=&quot;build.properties&quot;/&gt;
-
-&lt;property name=&quot;build&quot; value=&quot;build&quot;/&gt;
-&lt;property name=&quot;src&quot; value=&quot;src&quot;/&gt;
-&lt;property name=&quot;build.classes&quot; value=&quot;build/classes&quot; /&gt;
-
-&lt;path id=&quot;axis.classpath&quot;&gt;
-&lt;pathelement location=&quot;build/classes&quot; /&gt;
-&lt;fileset dir=&quot;${axis.home}/lib&quot;&gt;
-&lt;include name=&quot;**/*.jar&quot; /&gt;
-&lt;/fileset&gt;
-&lt;pathelement location=&quot;${build.classes}&quot; /&gt;
-&lt;/path&gt;
-
-&lt;path id=&quot;axis_client.classpath&quot;&gt;
-&lt;pathelement location=&quot;build/classes&quot; /&gt;
-&lt;fileset dir=&quot;${axis.home}&quot;&gt;
-&lt;include name=&quot;**/*.jar&quot; /&gt;
-&lt;/fileset&gt;
-&lt;fileset dir=&quot;lib&quot;&gt;
-&lt;include name=&quot;*.jar&quot; /&gt;
-&lt;/fileset&gt;
-&lt;pathelement location=&quot;${build.classes}&quot; /&gt;
-&lt;/path&gt;
-
-&lt;target name=&quot;usage&quot; description=&quot;Build file usage info (default task)&quot;&gt;
-&lt;echo message=&quot; &quot; /&gt;
-&lt;echo message=&quot;${project-name} &quot; /&gt;
-&lt;echo message=&quot;-------------------------------------------------------&quot; /&gt;
-&lt;echo message=&quot; &quot; /&gt;
-&lt;echo message=&quot;Available Targets:&quot; /&gt;
-&lt;echo message=&quot; &quot; /&gt;
-&lt;echo message=&quot; Compiling:&quot; /&gt;
-&lt;echo message=&quot; compile - Compiles the WSDL2Java source code&quot; /&gt;
-&lt;echo message=&quot; &quot; /&gt;
-&lt;echo message=&quot; Compiling client:&quot; /&gt;
-&lt;echo message=&quot; compile_client - Compiles the client source code&quot; /&gt;
-&lt;echo message=&quot; &quot; /&gt;
-&lt;echo message=&quot; Cleaning up:&quot; /&gt;
-&lt;echo message=&quot; clean - Delete class files&quot; /&gt;
-&lt;echo message=&quot; &quot; /&gt;
-&lt;echo message=&quot; WSDL:&quot; /&gt;
-&lt;echo message=&quot; wsdl2java - Generate source from WSDL&quot; /&gt;
-&lt;echo message=&quot; &quot; /&gt;
-&lt;echo message=&quot; AAR:&quot; /&gt;
-&lt;echo message=&quot; aar - Generate an .aar for deployment into WEB-INF/services&quot; /&gt;
-&lt;echo message=&quot; &quot; /&gt;
-&lt;echo message=&quot; Executing:&quot; /&gt;
-&lt;echo message=&quot; runLogin - Execute the runLogin client&quot; /&gt;
-&lt;/target&gt;
-
-&lt;target name=&quot;prepare&quot; &gt;
-&lt;mkdir dir=&quot;${build.classes}&quot; /&gt;
-&lt;/target&gt;
-
-&lt;target name=&quot;clean&quot; &gt;
-&lt;delete dir=&quot;${build}&quot; /&gt;
-&lt;delete dir=&quot;${dist}&quot; /&gt;
-&lt;/target&gt;
-
-&lt;target name=&quot;compile&quot;&gt;
-&lt;echo message=&quot;Compiling wsdl2 files&quot;/&gt;
-
-&lt;javac
-srcdir=&quot;output&quot;
-destdir=&quot;${build.classes}&quot;
-deprecation=&quot;true&quot;
-failonerror=&quot;true&quot; debug=&quot;true&quot;&gt;
-
-&lt;classpath refid=&quot;axis.classpath&quot;/&gt;
-&lt;/javac&gt;
-
-&lt;/target&gt;
-
-&lt;target name=&quot;wsdl2java&quot; depends=&quot;clean,prepare&quot;&gt;
-&lt;delete dir=&quot;output&quot; /&gt;
-&lt;java classname=&quot;org.apache.axis2.wsdl.WSDL2Java&quot; fork=&quot;true&quot;&gt;
-&lt;classpath refid=&quot;axis.classpath&quot;/&gt;
-&lt;arg value=&quot;-d&quot;/&gt;
-&lt;arg value=&quot;xmlbeans&quot;/&gt;
-&lt;arg value=&quot;-uri&quot;/&gt;
-&lt;arg file=&quot;wsdl/LoginEndpoint.wsdl&quot;/&gt;
-&lt;arg value=&quot;-ss&quot;/&gt;
-&lt;arg value=&quot;-g&quot;/&gt;
-&lt;arg value=&quot;-sd&quot;/&gt;
-&lt;arg value=&quot;-o&quot;/&gt;
-&lt;arg file=&quot;output&quot;/&gt;
-&lt;arg value=&quot;-p&quot;/&gt;
-&lt;arg value=&quot;org.example.types&quot;/&gt;
-&lt;/java&gt;
-
-&lt;!-- Move the schema folder to classpath--&gt;
-&lt;move todir=&quot;${build.classes}&quot;&gt;
-&lt;fileset dir=&quot;output/resources&quot;&gt;
-&lt;include name=&quot;**/*schema*/**/*.class&quot;/&gt;
-&lt;include name=&quot;**/*schema*/**/*.xsb&quot;/&gt;
-&lt;/fileset&gt;
-&lt;/move&gt;
-
-&lt;/target&gt;
-
-&lt;target name=&quot;jar_wsdl&quot; depends=&quot;compile&quot;&gt;
-&lt;jar jarfile=&quot;lib/axis2_example_wsdl.jar&quot; &gt;
-&lt;fileset dir=&quot;${build.classes}&quot; /&gt;
-&lt;/jar&gt;
-&lt;/target&gt;
-
-&lt;!-- build an .aar file for axis2 web services --&gt;
-&lt;target name=&quot;aar&quot; depends=&quot;compile&quot;&gt;
-&lt;delete dir=&quot;${build.classes}/META-INF&quot; /&gt;
-&lt;mkdir dir=&quot;${build.classes}/META-INF&quot; /&gt;
-&lt;copy todir=&quot;${build.classes}/META-INF&quot; &gt;
-&lt;fileset dir=&quot;output/resources&quot; &gt;
-&lt;!-- axis2 web services definitions file --&gt;
-&lt;include name=&quot;services.xml&quot;/&gt;
-&lt;/fileset&gt;
-&lt;fileset dir=&quot;wsdl&quot; &gt;
-&lt;include name=&quot;LoginEndpoint.wsdl&quot;/&gt;
-&lt;/fileset&gt;
-&lt;/copy&gt;
-&lt;jar jarfile=&quot;dist/LoginEndpoint.aar&quot; &gt;
-&lt;fileset dir=&quot;${build.classes}&quot; /&gt;
-&lt;/jar&gt;
-&lt;/target&gt;
-
-&lt;target name=&quot;compile_client&quot;&gt;
-&lt;echo message=&quot;Compiling client files&quot;/&gt;
-
-&lt;javac
-srcdir=&quot;src&quot;
-destdir=&quot;${build.classes}&quot;
-deprecation=&quot;true&quot;
-failonerror=&quot;true&quot; debug=&quot;true&quot;&gt;
-
-&lt;classpath refid=&quot;axis.classpath&quot;/&gt;
-&lt;/javac&gt;
-
-&lt;/target&gt;
-
-&lt;target name=&quot;runLogin&quot; depends=&quot;prepare,compile_client&quot; description=&quot;run simple Login client&quot;&gt;
-&lt;java classname=&quot;org.client.LoginClient&quot; &gt;
-&lt;classpath refid=&quot;axis_client.classpath&quot;/&gt;
-&lt;/java&gt;
-&lt;/target&gt;
-
-&lt;/project&gt;
-</pre>
-Place the above build.xml file in the 'bin' directory of the
-axis2 binary distribution. Then create a build.properties file in
-the same directory and specify the axis.home path pointing to the
-axis2 binary distribution
-E.g. :- axis.home=C://Axis2//axis2-1.1-bin
-The above build.xml example also assumes three empty directories
-exist, 'dist', 'lib', and 'src'.
-Below is a validated WSDL Document following the
-Document/Literal Style. The name of this file matches the name used
-in the WSDL2Java ant task above, LoginEndpoint.wsdl.
-<pre class="code">
-&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-
-    &lt;definitions name=&quot;LoginService&quot; targetNamespace=&quot;http://login&quot; xmlns:tns=&quot;http://login&quot;
-    xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
-    xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:ns2=&quot;http://login/types&quot;&gt;
-
-    &lt;types&gt;
-    &lt;schema targetNamespace=&quot;http://login/types&quot; xmlns:tns=&quot;http://login/types&quot;
-    xmlns:soap11-enc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
-    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
-    xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot;
-    xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
-    &lt;import namespace=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;/&gt;
-    &lt;element name=&quot;returnWebLoginElement&quot;&gt;
-    &lt;complexType&gt;
-    &lt;sequence&gt;
-
-    &lt;element ref=&quot;tns:soap_session_idElement&quot;/&gt;
-    &lt;element ref=&quot;tns:web_user_nameElement&quot;/&gt;
-    &lt;/sequence&gt;
-    &lt;/complexType&gt;
-    &lt;/element&gt;
-    &lt;element name=&quot;webLoginElement&quot;&gt;
-
-    &lt;complexType&gt;
-    &lt;sequence&gt;
-    &lt;element ref=&quot;tns:user_nameElement&quot;/&gt;
-    &lt;element ref=&quot;tns:user_passwordElement&quot;/&gt;
-    &lt;/sequence&gt;
-    &lt;/complexType&gt;
-
-    &lt;/element&gt;
-    &lt;element name=&quot;user_nameElement&quot; type=&quot;xsd:string&quot;/&gt;
-    &lt;element name=&quot;user_passwordElement&quot; type=&quot;xsd:string&quot;/&gt;
-    &lt;element name=&quot;soap_session_idElement&quot; type=&quot;xsd:string&quot;/&gt;
-    &lt;element name=&quot;web_user_nameElement&quot; type=&quot;xsd:string&quot;/&gt;
-    &lt;/schema&gt;&lt;/types&gt;
-
-    &lt;message name=&quot;LoginEndpoint_webLogin&quot;&gt;
-    &lt;part name=&quot;parameters&quot; element=&quot;ns2:webLoginElement&quot;/&gt;
-    &lt;/message&gt;
-    &lt;message name=&quot;LoginEndpoint_webLoginResponse&quot;&gt;
-    &lt;part name=&quot;result&quot; element=&quot;ns2:returnWebLoginElement&quot;/&gt;
-    &lt;/message&gt;
-
-    &lt;portType name=&quot;LoginEndpoint&quot;&gt;
-    &lt;operation name=&quot;webLogin&quot;&gt;
-    &lt;input message=&quot;tns:LoginEndpoint_webLogin&quot; name=&quot;LoginEndpoint_webLogin&quot;/&gt;
-    &lt;output message=&quot;tns:LoginEndpoint_webLoginResponse&quot; name=&quot;LoginEndpoint_webLoginResponse&quot;/&gt;
-    &lt;/operation&gt;
-    &lt;/portType&gt;
-
-    &lt;binding name=&quot;LoginEndpointBinding&quot; type=&quot;tns:LoginEndpoint&quot;&gt;
-    &lt;soap:binding transport=&quot;http://schemas.xmlsoap.org/soap/http&quot; style=&quot;document&quot;/&gt;
-    &lt;operation name=&quot;webLogin&quot;&gt;
-    &lt;soap:operation soapAction=&quot;webLogin&quot;/&gt;
-    &lt;input name=&quot;LoginEndpoint_webLogin&quot;&gt;
-    &lt;soap:body use=&quot;literal&quot;/&gt;
-
-    &lt;/input&gt;
-    &lt;output name=&quot;LoginEndpoint_webLoginResponse&quot;&gt;
-    &lt;soap:body use=&quot;literal&quot;/&gt;
-    &lt;/output&gt;
-    &lt;/operation&gt;
-    &lt;/binding&gt;
-
-    &lt;service name=&quot;LoginService&quot;&gt;
-    &lt;port name=&quot;LoginEndpointPort&quot; binding=&quot;tns:LoginEndpointBinding&quot;&gt;
-    &lt;soap:address location=&quot;http://localhost:8080/axis2/services/LoginService&quot;/&gt;&lt;/port&gt;
-    &lt;/service&gt;&lt;/definitions&gt;
-</pre>
-Place the above file, named LoginEndpoint.wsdl, in the directory
-'wsdl' which is also inside the 'bin' directory. Run the wsdl2java
-command via the ant task defined above (&gt;ant wsdl2java), and
-there will be a directory called 'output' created. This directory
-contains the WSDL2Java generated source.
-<p>An important detail is that an XMLBean class file is also
-generated by WSDL2Java, TypeSystemHolder.class. That file is placed
-into build/classes by the above ant task and will be needed to
-compile the generated sources. A frequent problem is users get an
-error such as:</p>
-<p><em><b>ClassNotFoundException : Cannot load SchemaTypeSystem.
-Unable to load class with name
-schemaorg_apache_xmlbeans.system.s68C41DB812F52C975439BA10FE4FEE54.TypeSystemHolder.
-Make sure the generated binary files are on the
-classpath.</b></em></p>
-<p>The TypeSystemHolder.class generated by WSDL2Java must be placed
-in your classpath in order to avoid this error.</p>
-<p>The next step is to modify the generated Skeleton Java Source
-file - the Web service. This file as generated returns null and
-needs to be updated to contain the business logic.</p>
-<p>After the WSDL2Java command runs the file LoginEndpoint.wsdl,
-edit the following file:</p>
-<p>output/src/org/example/types/LoginServiceSkeleton.java. You
-should see the following code:</p>
-<pre class="code">
-/**
-    * LoginServiceSkeleton.java
-    *
-    * This file was auto-generated from WSDL
-    * by the Apache Axis2 version: 1.0-RC4 Apr 28, 2006 (05:23:23 IST)
-    */
-    package org.example.types;
-    /**
-    * LoginServiceSkeleton java skeleton for the axisService
-    */
-    public class LoginServiceSkeleton {
-
-
-    /**
-    * Auto generated method signature
-
-    * @param param0
-
-    */
-    public login.types.ReturnWebLoginElementDocument webLogin
-    (login.types.WebLoginElementDocument param0 )
-
-    {
-    //Todo fill this with the necessary business logic
-    throw new java.lang.UnsupportedOperationException();
-    }
-
-    }
-</pre>
-<p>Replace the contents of this file with the following, which uses
-the complex types generated by WSDL2Java and the example wsdl
-file:</p>
-<pre class="code">
-/**
-    * LoginServiceSkeleton.java
-    *
-    * This file was auto-generated from WSDL
-    * by the Apache Axis2 version: 1.0-RC4 Apr 28, 2006 (05:23:23 IST)
-    */
-    package org.example.types;
-    import login.types.ReturnWebLoginElementDocument;
-    import login.types.ReturnWebLoginElementDocument.*;
-    import login.types.WebLoginElementDocument;
-    import login.types.WebLoginElementDocument.*;
-
-    /**
-    * Auto generated java skeleton for the service by the Axis code generator
-    */
-    public class LoginServiceSkeleton {
-
-    /**
-    * Auto generated method signature
-
-    * @param webLoginElementDocument changed from param0
-
-    */
-    public ReturnWebLoginElementDocument webLogin
-    (WebLoginElementDocument webLoginElementDocument ){
-
-    //Todo fill this with the necessary business logic
-    System.out.println(&quot;LoginServiceSkeleton.webLogin reached successfully!&quot;);
-
-    // Get parameters passed in
-    WebLoginElement webLoginElement = webLoginElementDocument.getWebLoginElement();
-    String userName = webLoginElement.getUserNameElement();
-    String password = webLoginElement.getUserPasswordElement();
-    System.out.println(&quot;LoginServiceSkeleton.webLogin userName: &quot; + userName);
-    System.out.println(&quot;LoginServiceSkeleton.webLogin password: &quot; + password);
-
-    // input paramaters would be used here
-
-    // prepare output
-    ReturnWebLoginElementDocument retDoc =
-    ReturnWebLoginElementDocument.Factory.newInstance();
-
-    ReturnWebLoginElement retElement = ReturnWebLoginElement.Factory.newInstance();
-
-    retElement.setWebUserNameElement(&quot;joe sixpack&quot;);
-    retElement.setSoapSessionIdElement(&quot;some_random_string&quot;);
-    System.out.println(&quot;validate retElement: &quot; + retElement.validate());
-
-    retDoc.setReturnWebLoginElement(retElement);
-    System.out.println(&quot;validate retDoc: &quot; + retDoc.validate());
-
-    System.out.println(&quot;LoginServiceSkeleton.webLogin returning...&quot;);
-
-    return retDoc;
-
-    }
-    }
-</pre>
-<p>The next steps assume the axis2.war has been deployed and has
-expanded in a servlet container.</p>
-<p>Run the 'jar_wsdl' ant task from the example build.xml (&gt;ant
-jar_wsdl), which generates a jar file axis2_example_wsdl.jar in the
-'bin/lib' directory. This jar will be used to compile the client,
-and also will be placed in the servlet container.</p>
-<p>Next, run the 'aar' ant task from the example build.xml (&gt;ant
-aar), which generates the deployable axis2 Web service. Place
-dist/LoginEndpoint.aar into axis2/WEB-INF/services . Place
-lib/axis2_example_wsdl.jar into axis2/WEB-INF/lib . Verify the
-happy axis page loaded the services correctly - there should be the
-service 'LoginEndpoint' with the available operation 'webLogin'
-displayed.</p>
-<p>The last step is to create and run the client. In the src
-directory create the file org.client.LoginClient.java, with the
-contents below:</p>
-<pre class="code">
-package org.client;
-
-    import org.apache.axis2.AxisFault;
-
-    import login.types.ReturnWebLoginElementDocument;
-    import login.types.ReturnWebLoginElementDocument.*;
-    import login.types.WebLoginElementDocument;
-    import login.types.WebLoginElementDocument.*;
-    import org.example.types.LoginServiceStub;
-
-    /**
-    * Login.
-    *
-    */
-    public class LoginClient {
-
-    public static void main(String[] args) {
-    try {
-
-    System.out.println(&quot;webLogin, firing...&quot;);
-    LoginServiceStub stub = new LoginServiceStub();
-
-    WebLoginElementDocument webLoginElementDocument
-    = WebLoginElementDocument.Factory.newInstance();
-    WebLoginElement webLoginElement =
-    WebLoginElement.Factory.newInstance();
-    webLoginElement.setUserNameElement(&quot;joe&quot;);
-    webLoginElement.setUserPasswordElement(&quot;sixpack&quot;);
-
-    webLoginElementDocument.setWebLoginElement(webLoginElement);
-
-    System.out.println(&quot;validate: &quot; + webLoginElement.validate());
-    stub.webLogin(webLoginElementDocument);
-
-    ReturnWebLoginElementDocument returnWebLoginElementDocument =
-    stub.webLogin(webLoginElementDocument);
-
-    System.out.println(&quot;Client returned&quot;);
-
-    ReturnWebLoginElementDocument.ReturnWebLoginElement
-    retElement = returnWebLoginElementDocument.getReturnWebLoginElement();
-
-    System.out.println(&quot;WebUserName: &quot; + retElement.getWebUserNameElement());
-    System.out.println(&quot;SOAPSessionId: &quot; + retElement.getSoapSessionIdElement());
-    System.out.println(&quot;webLogin, completed!!!&quot;);
-
-    } catch (AxisFault axisFault) {
-    axisFault.printStackTrace();
-    } catch (Exception ex) {
-    ex.printStackTrace();
-    }
-    }
-    }
-</pre>
-<p>Now run the ant task 'runLogin' (&gt;ant runLogin). The
-following output should appear:</p>
-<pre class="code">
-runLogin:
-    [echo] running the webLogin client
-    [java] webLogin, firing...
-    [java] validate: true
-    [java] Client returned
-    [java] WebUserName: joe sixpack
-    [java] SOAPSessionId: some_random_string
-    [java] webLogin, completed!!!
-</pre>
-<a name="appendix"></a>
-<h2>Appendix</h2>
-<ul>
-<li>Eclipse reference - <a href="http://www.eclipse.org/">http://www.eclipse.org/</a></li>
-<li>Custom Ant Tasks - <a href="http://ant.apache.org/manual/develop.html">http://ant.apache.org/manual/develop.html</a></li>
-</ul>
-
+        <html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta name="generator" content="HTML Tidy for Windows (vers 14 June 2007), see www.w3.org"></meta>
+<meta http-equiv="content-type" content=""></meta>
+Code Generator Tool Guide for Command Line and Ant
+Task
+<link href="../../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></link>
+</head>
+
+<h1>Code Generator Tool Guide for Command Line and Ant Task</h1>
+<p>The Code Generator tool consists of a command line version and
+an Ant Task. This document will list the command line references
+and Ant task references. Also in detail, this document shows how to
+build file using custom Ant task and invoking the Code Generator
+from Ant.</p>
+<p>This tool is bundled with the <a href="http://ws.apache.org/axis2/download.cgi">Axis2 Binary
+Distribution</a>.</p>
+<h2>Content</h2>
+<ul>
+<li><a href="#intro">Introduction</a></li>
+<li><a href="#cmdline">Command Line Version</a>
+<ul>
+<li><a href="#cmdref">Option Reference</a></li>
+</ul>
+</li>
+<li><a href="#ant">Ant Task</a>
+<ul>
+<li><a href="#antref">Ant Task Reference</a></li>
+<li><a href="#example">Example Build File Using the Custom Ant
+Task</a></li>
+<li><a href="#invoking">Invoking the Code Generator From
+Ant</a></li>
+</ul>
+</li>
+<li><a href="#appendix">Appendix</a></li>
+</ul>
+<a name="intro"></a>
+<h2>Introduction</h2>
+This basic tool is implemented by the WSDL2Code class and just
+for the convenience in the case of Java (which would be the
+majority) there is another WSDL2Java class. One can choose to run
+the main classes directly or use one of the scripts to run the
+WSDL2Code and WSDL2Java appropriately. (the scripts are found in
+the bin directory of the <a href="../../download/1_1/download.html#std-bin">Standard Binary
+Distribution</a>)
+<a name="cmdline"></a>
+<h2>Command Line Version</h2>
+For those users who wish to use the command line version of the
+tool, this section will be of value.
+<a name="cmdref"></a>
+<h3>Option Reference</h3>
+Usage WSDL2Code &lt;option_reference&gt;
+<b>E.g. :- WSDL2Code -uri &lt;Location of WSDL&gt;</b>
+<table class="bodyTable">
+<tbody>
+<tr class="a">
+<td><strong>Short Option</strong></td>
+<td><strong>Long Option</strong></td>
+<td><strong>Description</strong></td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-uri &lt;Location of WSDL&gt;</td>
+<td>None</td>
+<td>WSDL file location. This should point to a WSDL
+file in the local file system.</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-o &lt;output Location&gt;</td>
+<td>--output &lt;output Location&gt;</td>
+<td>Output file location. This is where the files would
+be copied once the code generation is done. If this option is
+omitted the generated files would be copied to the working
+directory.</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-l &lt;language&gt;</td>
+<td>--language &lt;language&gt;</td>
+<td>Output language. Currently the code generator can
+generate code in Java but it has the ability to be extended to
+support other languages.</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-p &lt;package name&gt;</td>
+<td>--package &lt;package name&gt;</td>
+<td>The target package name. If omitted, a default
+package (formed using the target namespace of the WSDL) will be
+used.</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-a</td>
+<td>--async</td>
+<td>Generate code only for async style. When this
+option is used the generated stubs will have only the asynchronous
+invocation methods. Switched off by default.</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-s</td>
+<td>--sync</td>
+<td>Generate code only for sync style . When this
+option is used the generated stubs will have only the synchronous
+invocation methods. Switched off by default. When used with the -a
+option, this takes precedence.</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-t</td>
+<td>--test-case</td>
+<td>Generates a test case. In the case of Java it would
+be a JUnit test case.</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-ss</td>
+<td>--server-side</td>
+<td>Generates server side code (i.e. skeletons).
+Default is off.</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-sd</td>
+<td>--service-description</td>
+<td>Generates the service descriptor (i.e. server.xml).
+Default is off. Only valid with -ss, the server side code
+generation option.</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-d &lt;databinding&gt;</td>
+<td>--databinding-method &lt;databinding&gt;</td>
+<td>Specifies the Databinding framework. Valid values
+are xmlbeans, adb, jibx, and none. Default is adb.</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-g</td>
+<td>--generate-all</td>
+<td>Generates all the classes. This option is valid
+only with the -ss (server side code generation) option. When on,
+the client code (stubs) will also be generated along with the
+skeleton.</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-u</td>
+<td>--unpack-classes</td>
+<td>Unpack classes. This option specifies whether to
+unpack the classes and generate separate classes for the
+databinders.</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-sn &lt;service name&gt;</td>
+<td>--service-name &lt;service name&gt;</td>
+<td>Specifies the service name to be code generated. If
+the service name is not specified, then the first service will be
+picked.</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-pn &lt;port name&gt;</td>
+<td>--port-name &lt;port name&gt;</td>
+<td>Specifies the port name to be code generated. If
+the port name is not specified, then the first port (of the
+selected service) will be picked.</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-ns2p</td>
+<td>--namespace2package</td>
+<td>Specifies a comma separated list of namespaces and
+packages where the given package will be used in the place of the
+auto generated package for the relevant namespace. The list will be
+the format of ns1=pkg1,ns2=pkg2.</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-ssi</td>
+<td>--serverside-interface</td>
+<td>Generate an interface for the service
+skeleton.</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-wv</td>
+<td>--wsdl-version</td>
+<td>WSDL Version. Valid Options : 2, 2.0, 1.1</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-S</td>
+<td>--source-folder</td>
+<td>Specify a directory path for generated source</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-R</td>
+<td>--resource-folder</td>
+<td>Specify a directory path for generated resources</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-em</td>
+<td>--external-mapping</td>
+<td>Specify an external mapping file</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-f</td>
+<td>--flatten-files</td>
+<td>Flattens the generated files</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-uw</td>
+<td>--unwrap-params</td>
+<td>Switch on un-wrapping</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-xsdconfig</td>
+<td></td>
+<td>Use XMLBeans .xsdconfig file. Valid only with -d xmlbeans</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-ap</td>
+<td>--all-ports</td>
+<td>Generate code for all ports</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-or</td>
+<td>--over-ride</td>
+<td>Overwrite the existing classes</td>
+<td></td>
+</tr>
+<tr class="a">
+<td>-b</td>
+<td>--backword-compatible</td>
+<td>Generate Axis 1.x backword compatible code</td>
+<td></td>
+</tr>
+<tr class="b">
+<td>-sp</td>
+<td>--suppress-prefixes</td>
+<td>Suppress namespace prefixes (Optimzation that reduces size of soap request/response)</td>
+<td></td>
+</tr>
+<tr class="a">
+<td></td>
+<td>--noBuildXML</td>
+<td>Don't generate the build.xml in the output directory</td>
+<td></td>
+</tr>
+<tr class="b">
+<td></td>
+<td>--noWSDL</td>
+<td>Don't generate WSDL's in the resources directory</td>
+<td></td>
+</tr>
+<tr class="a">
+<td></td>
+<td>--noMessageReceiver</td>
+<td>Don't generate a MessageReceiver in the generated sources</td>
+<td></td>
+</tr>
+</tbody>
+</table>
+Apart from these mentioned options one can pass extra options by
+prefixing them with -E (uppercase). These extra options will be
+processed by the extensions. The extra options that can be passed
+are documented separately with the extensions documentation (For
+example with ADB).
+<a name="ant"></a>
+<h2>Ant Task</h2>
+The code generator also comes bundled with an Ant task. The ant
+task is implemented by the org.apache.axis2.tool.ant.AntCodegenTask
+class. Following are the ant task attributes.
+<a name="antref"></a>
+<h3>Ant Task Reference</h3>
+<table class="bodyTable">
+<tbody>
+<tr class="b">
+<td>wsdlfilename</td>
+<td>WSDL file location. Maps to the -uri option of the command line
+tool.</td>
+</tr>
+<tr class="a">
+<td>output</td>
+<td>Output file location. This is where the files would be copied
+once the code generation is done. If this option is omitted the
+generated files would be copied to the working directory. Maps to
+the -o option of the command line tool.</td>
+</tr>
+<tr class="b">
+<td>language</td>
+<td>Output language. Currently the code generator can generate code
+in Java. Maps to the -l option of the command line tool.</td>
+</tr>
+<tr class="a">
+<td>packageName</td>
+<td>The target package name. If omitted, a default package (formed
+using the target namespace of the WSDL) will be used. Maps to the
+-p option of the command line tool.</td>
+</tr>
+<tr class="b">
+<td>databindingName</td>
+<td>Data binding framework name. Maps to the -d option of the
+command line tool. Possible values include &quot;adb&quot;, &quot;xmlbeans&quot;,
+&quot;jibx&quot;.</td>
+</tr>
+<tr class="a">
+<td>serviceName</td>
+<td>The name of the service in the case of multiple services. Maps
+to -sn options of the command line tool.</td>
+</tr>
+<tr class="b">
+<td>portName</td>
+<td>The name of the port in the presence of multiple ports. Maps to
+-pn options of the command line tool.</td>
+</tr>
+<tr class="a">
+<td>asyncOnly</td>
+<td>Generate code only for async style. When this option is used
+the generated stubs will have only the asynchronous invocation
+methods. Defaults to false if omitted. Only true and false are
+applicable as values. Maps to the -a option of the command line
+tool.</td>
+</tr>
+<tr class="b">
+<td>syncOnly</td>
+<td>Generate code only for sync style. When this option is used the
+generated stubs will have only the synchronous invocation methods.
+Defaults to false if omitted. Only true and false are applicable as
+values. Maps to the -s option of the command line tool.</td>
+</tr>
+<tr class="a">
+<td>serverSide</td>
+<td>Generates server side code (i.e. skeletons). Only true and
+false are applicable as values. Default is false. Maps to the -ss
+option of the command line tool.</td>
+</tr>
+<tr class="b">
+<td>testcase</td>
+<td>Generates a test case. Possible values are true and false. Maps
+to the -t options of the command line tool.</td>
+</tr>
+<tr class="a">
+<td>generateServiceXml</td>
+<td>Generates server side code (i.e. skeletons). Only true and
+false are applicable as values. Default is false. Maps to the -sd
+option of the command line tool.</td>
+</tr>
+<tr class="b">
+<td>unpackClasses</td>
+<td>Unpacks the generated classes. This forces the databinding
+classes to be generated separately, which otherwise would have been
+generated as inner classes.</td>
+</tr>
+<tr class="a">
+<td>generateAllClasses</td>
+<td>Generates all the classes including client and server side
+code. Maps to the -g option of the command line tool.</td>
+</tr>
+<tr class="b">
+<td>namespaceToPackages</td>
+<td>A list of namespace to package mappings.</td>
+</tr>
+<tr class="a">
+<td>serverSideInterface</td>
+<td>Flag stating whether to generate an interface for the server
+side skeleton.</td>
+</tr>
+<tr class="b">
+<td>repositoryPath</td>
+<td>Sets the repository path to be used. Maps to the -r option of
+the command line tool.</td>
+</tr>
+<tr class="a">
+<td>wsdlVersion</td>
+<td>Sets the version of the wsdl that is being used during
+codegeneration. This deafults to 1.1 and one can set this to 2,
+when trying to work with a WSDL 2.0 document. Maps to the -wv
+option of the command line tool.</td>
+</tr>
+<tr class="b">
+<td>externalMapping</td>
+<td>Location of the external mapping file to be used. Maps to the
+-em option of the command line tool.</td>
+</tr>
+<tr class="a">
+<td>targetSourceFolderLocation</td>
+<td>Rather than dumping all the code in the same location, one has
+the option to make the sources to be generated in a different
+location, given using this option. Maps to the -S option of the
+command line tool.</td>
+</tr>
+<tr class="b">
+<td>targetResourcesFolderLocation</td>
+<td>Rather than dumping all the code in the same location, one has
+the option to make the resources to be generated in a different
+location, given using this option. Maps to the -R option of the
+command line tool.</td>
+</tr>
+<tr class="a">
+<td>unwrap</td>
+<td>This will select between wrapped and unwrapped during code
+generation. Default is set to false. Maps to the -uw option of the
+command line tool.</td>
+</tr>
+</tbody>
+</table>
+<a name="example"></a>
+<h3>Example Build File Using the Custom Ant Task</h3>
+Following is an example ant build file that uses the custom Ant
+task. You can use any wsdl file to test the example. Replace the
+&quot;CombinedService.wsdl&quot; with the name of your wsdl file in the
+following script.
+<pre>
+1 &lt;?xml version=&quot;1.0&quot;?&gt;
+    2 &lt;project name=&quot;CodegenExample&quot; default=&quot;main&quot; basedir=&quot;.&quot;&gt;
+    3
+    4 &lt;path id=&quot;example.classpath&quot;&gt;
+    5 &lt;fileset dir=&quot;classes&quot;&gt;
+    6 &lt;include name=&quot;**/*.jar&quot; /&gt;
+    7 &lt;/fileset&gt;
+    8 &lt;/path&gt;
+    9
+    10 &lt;target name=&quot;declare&quot; &gt;
+    11 &lt;taskdef name=&quot;codegen&quot;
+    12 classname=&quot;org.apache.axis2.tool.ant.AntCodegenTask&quot;
+    13 classpathref=&quot;example.classpath&quot;/&gt;
+    15 &lt;/target&gt;
+    16
+    17 &lt;target name=&quot;main&quot; depends=&quot;declare&quot;&gt;
+    18 &lt;codegen
+    19 wsdlfilename=&quot;C:\test\wsdl\CombinedService.wsdl&quot;
+    20 output=&quot;C:\output&quot;
+    21 serverside=&quot;true&quot;
+    22 generateservicexml=&quot;true&quot;/&gt;
+    23 &lt;/target&gt;
+    24
+    25 &lt;/project&gt;
+</pre>
+In the above build script, from line 4 to 8 it sets the
+classpath and includes all the .jar files (which are listed below)
+into the classpath. From line 10 to 15 it creates a target to
+declare a task called &quot;codegen&quot; and sets the appropriate class
+(org.apache.axis2.tool.ant.AntCodegenTask) within the classpath in
+line 12. From line 17 to 23 it creates the &quot;main&quot; target to
+generate the code from the given wsdl. There are some arguments set
+form line 19 to 22. Here in line 19 it sets the location of the
+wsdl. In line 20 it sets the output directory in which the code is
+generated. Line 21 indicates that this build generates the server
+side code(skeleton) and line 22 indicates that the services.xml is
+also generated.
+<p>Notice the main target that uses the &quot;codegen&quot; task which will
+use the org.apache.axis2.tool.ant.AntCodegenTask class and run the
+code generation tool internally while passing the relevant
+arguments and do the proper generation. If a user types</p>
+<p><code>&gt;ant</code> or <code>&gt;ant main</code></p>
+<p>it will generate the server side code and services.xml for the
+given WSDL file (C:\test\wsdl\CombinedService.wsdl -in the above
+instance) and the generated code will be written to the specified
+output path (C:\output - in the above instance).</p>
+<p>For this Ant task to work the following jars need to be in the
+class path.</p>
+<ul>
+<li>axis2-*.jar (from the Axis2 distribution)</li>
+<li>wsdl4j-1.6.2.jar or higher (The WSDL4J implementation jar.
+Bundled with the Axis2 distribution)</li>
+<li>stax-api-1.0.1.jar (The StAX API's that contain the
+javax.xml.namespace.QName class. This jar may be replaced by any
+other jar that contains the javax.xml.namespace.QName
+implementation. However Axis2 uses this class from the
+stax-api-1.0.1.jar which comes bundled with the Axis2
+distribution)</li>
+<li>commons-logging-1.1.jar, neethi-2.0.jar and XmlSchema-1.2.jar
+(from the Axis2 distribution)</li>
+<li>axiom-api-1.2.1.jar and axiom-impl-1.2.1.jar (from the Axis2
+distribution)</li>
+<li>activation-1.1.jar (from the Axis2 distribution)</li>
+<li>wstx-asl-3.1.0.jar (from the Axis2 distribution)</li>
+</ul>
+<a name="invoking"></a>
+<h3>Invoking the Code Generator From Ant</h3>
+Since the users may find altering their ant class path a bit
+daunting they can also follow an easier technique. The code
+generator main class can be invoked directly through the build
+file.
+Below is an example of a full build.xml needed to run WSDL2Java
+and generate the Java source files, compile the sources, and build
+an AAR file ready for deployment (These are done one by one, by
+calling the targets in the build file separately):
+<pre class="code">
+&lt;!DOCTYPE project&gt;
+
+&lt;project name=&quot;wsdl2java-example&quot; default=&quot;usage&quot; basedir=&quot;.&quot;&gt;
+
+&lt;property name=&quot;project-name&quot; value=&quot;wsdl2java-example&quot;/&gt;
+&lt;property file=&quot;build.properties&quot;/&gt;
+
+&lt;property name=&quot;build&quot; value=&quot;build&quot;/&gt;
+&lt;property name=&quot;src&quot; value=&quot;src&quot;/&gt;
+&lt;property name=&quot;build.classes&quot; value=&quot;build/classes&quot; /&gt;
+
+&lt;path id=&quot;axis.classpath&quot;&gt;
+&lt;pathelement location=&quot;build/classes&quot; /&gt;
+&lt;fileset dir=&quot;${axis.home}/lib&quot;&gt;
+&lt;include name=&quot;**/*.jar&quot; /&gt;
+&lt;/fileset&gt;
+&lt;pathelement location=&quot;${build.classes}&quot; /&gt;
+&lt;/path&gt;
+
+&lt;path id=&quot;axis_client.classpath&quot;&gt;
+&lt;pathelement location=&quot;build/classes&quot; /&gt;
+&lt;fileset dir=&quot;${axis.home}&quot;&gt;
+&lt;include name=&quot;**/*.jar&quot; /&gt;
+&lt;/fileset&gt;
+&lt;fileset dir=&quot;lib&quot;&gt;
+&lt;include name=&quot;*.jar&quot; /&gt;
+&lt;/fileset&gt;
+&lt;pathelement location=&quot;${build.classes}&quot; /&gt;
+&lt;/path&gt;
+
+&lt;target name=&quot;usage&quot; description=&quot;Build file usage info (default task)&quot;&gt;
+&lt;echo message=&quot; &quot; /&gt;
+&lt;echo message=&quot;${project-name} &quot; /&gt;
+&lt;echo message=&quot;-------------------------------------------------------&quot; /&gt;
+&lt;echo message=&quot; &quot; /&gt;
+&lt;echo message=&quot;Available Targets:&quot; /&gt;
+&lt;echo message=&quot; &quot; /&gt;
+&lt;echo message=&quot; Compiling:&quot; /&gt;
+&lt;echo message=&quot; compile - Compiles the WSDL2Java source code&quot; /&gt;
+&lt;echo message=&quot; &quot; /&gt;
+&lt;echo message=&quot; Compiling client:&quot; /&gt;
+&lt;echo message=&quot; compile_client - Compiles the client source code&quot; /&gt;
+&lt;echo message=&quot; &quot; /&gt;
+&lt;echo message=&quot; Cleaning up:&quot; /&gt;
+&lt;echo message=&quot; clean - Delete class files&quot; /&gt;
+&lt;echo message=&quot; &quot; /&gt;
+&lt;echo message=&quot; WSDL:&quot; /&gt;
+&lt;echo message=&quot; wsdl2java - Generate source from WSDL&quot; /&gt;
+&lt;echo message=&quot; &quot; /&gt;
+&lt;echo message=&quot; AAR:&quot; /&gt;
+&lt;echo message=&quot; aar - Generate an .aar for deployment into WEB-INF/services&quot; /&gt;
+&lt;echo message=&quot; &quot; /&gt;
+&lt;echo message=&quot; Executing:&quot; /&gt;
+&lt;echo message=&quot; runLogin - Execute the runLogin client&quot; /&gt;
+&lt;/target&gt;
+
+&lt;target name=&quot;prepare&quot; &gt;
+&lt;mkdir dir=&quot;${build.classes}&quot; /&gt;
+&lt;/target&gt;
+
+&lt;target name=&quot;clean&quot; &gt;
+&lt;delete dir=&quot;${build}&quot; /&gt;
+&lt;delete dir=&quot;${dist}&quot; /&gt;
+&lt;/target&gt;
+
+&lt;target name=&quot;compile&quot;&gt;
+&lt;echo message=&quot;Compiling wsdl2 files&quot;/&gt;
+
+&lt;javac
+srcdir=&quot;output&quot;
+destdir=&quot;${build.classes}&quot;
+deprecation=&quot;true&quot;
+failonerror=&quot;true&quot; debug=&quot;true&quot;&gt;
+
+&lt;classpath refid=&quot;axis.classpath&quot;/&gt;
+&lt;/javac&gt;
+
+&lt;/target&gt;
+
+&lt;target name=&quot;wsdl2java&quot; depends=&quot;clean,prepare&quot;&gt;
+&lt;delete dir=&quot;output&quot; /&gt;
+&lt;java classname=&quot;org.apache.axis2.wsdl.WSDL2Java&quot; fork=&quot;true&quot;&gt;
+&lt;classpath refid=&quot;axis.classpath&quot;/&gt;
+&lt;arg value=&quot;-d&quot;/&gt;
+&lt;arg value=&quot;xmlbeans&quot;/&gt;
+&lt;arg value=&quot;-uri&quot;/&gt;
+&lt;arg file=&quot;wsdl/LoginEndpoint.wsdl&quot;/&gt;
+&lt;arg value=&quot;-ss&quot;/&gt;
+&lt;arg value=&quot;-g&quot;/&gt;
+&lt;arg value=&quot;-sd&quot;/&gt;
+&lt;arg value=&quot;-o&quot;/&gt;
+&lt;arg file=&quot;output&quot;/&gt;
+&lt;arg value=&quot;-p&quot;/&gt;
+&lt;arg value=&quot;org.example.types&quot;/&gt;
+&lt;/java&gt;
+
+&lt;!-- Move the schema folder to classpath--&gt;
+&lt;move todir=&quot;${build.classes}&quot;&gt;
+&lt;fileset dir=&quot;output/resources&quot;&gt;
+&lt;include name=&quot;**/*schema*/**/*.class&quot;/&gt;
+&lt;include name=&quot;**/*schema*/**/*.xsb&quot;/&gt;
+&lt;/fileset&gt;
+&lt;/move&gt;
+
+&lt;/target&gt;
+
+&lt;target name=&quot;jar_wsdl&quot; depends=&quot;compile&quot;&gt;
+&lt;jar jarfile=&quot;lib/axis2_example_wsdl.jar&quot; &gt;
+&lt;fileset dir=&quot;${build.classes}&quot; /&gt;
+&lt;/jar&gt;
+&lt;/target&gt;
+
+&lt;!-- build an .aar file for axis2 web services --&gt;
+&lt;target name=&quot;aar&quot; depends=&quot;compile&quot;&gt;
+&lt;delete dir=&quot;${build.classes}/META-INF&quot; /&gt;
+&lt;mkdir dir=&quot;${build.classes}/META-INF&quot; /&gt;
+&lt;copy todir=&quot;${build.classes}/META-INF&quot; &gt;
+&lt;fileset dir=&quot;output/resources&quot; &gt;
+&lt;!-- axis2 web services definitions file --&gt;
+&lt;include name=&quot;services.xml&quot;/&gt;
+&lt;/fileset&gt;
+&lt;fileset dir=&quot;wsdl&quot; &gt;
+&lt;include name=&quot;LoginEndpoint.wsdl&quot;/&gt;
+&lt;/fileset&gt;
+&lt;/copy&gt;
+&lt;jar jarfile=&quot;dist/LoginEndpoint.aar&quot; &gt;
+&lt;fileset dir=&quot;${build.classes}&quot; /&gt;
+&lt;/jar&gt;
+&lt;/target&gt;
+
+&lt;target name=&quot;compile_client&quot;&gt;
+&lt;echo message=&quot;Compiling client files&quot;/&gt;
+
+&lt;javac
+srcdir=&quot;src&quot;
+destdir=&quot;${build.classes}&quot;
+deprecation=&quot;true&quot;
+failonerror=&quot;true&quot; debug=&quot;true&quot;&gt;
+
+&lt;classpath refid=&quot;axis.classpath&quot;/&gt;
+&lt;/javac&gt;
+
+&lt;/target&gt;
+
+&lt;target name=&quot;runLogin&quot; depends=&quot;prepare,compile_client&quot; description=&quot;run simple Login client&quot;&gt;
+&lt;java classname=&quot;org.client.LoginClient&quot; &gt;
+&lt;classpath refid=&quot;axis_client.classpath&quot;/&gt;
+&lt;/java&gt;
+&lt;/target&gt;
+
+&lt;/project&gt;
+</pre>
+Place the above build.xml file in the 'bin' directory of the
+axis2 binary distribution. Then create a build.properties file in
+the same directory and specify the axis.home path pointing to the
+axis2 binary distribution
+E.g. :- axis.home=C://Axis2//axis2-1.1-bin
+The above build.xml example also assumes three empty directories
+exist, 'dist', 'lib', and 'src'.
+Below is a validated WSDL Document following the
+Document/Literal Style. The name of this file matches the name used
+in the WSDL2Java ant task above, LoginEndpoint.wsdl.
+<pre class="code">
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+
+    &lt;definitions name=&quot;LoginService&quot; targetNamespace=&quot;http://login&quot; xmlns:tns=&quot;http://login&quot;
+    xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
+    xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:ns2=&quot;http://login/types&quot;&gt;
+
+    &lt;types&gt;
+    &lt;schema targetNamespace=&quot;http://login/types&quot; xmlns:tns=&quot;http://login/types&quot;
+    xmlns:soap11-enc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
+    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+    xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot;
+    xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
+    &lt;import namespace=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;/&gt;
+    &lt;element name=&quot;returnWebLoginElement&quot;&gt;
+    &lt;complexType&gt;
+    &lt;sequence&gt;
+
+    &lt;element ref=&quot;tns:soap_session_idElement&quot;/&gt;
+    &lt;element ref=&quot;tns:web_user_nameElement&quot;/&gt;
+    &lt;/sequence&gt;
+    &lt;/complexType&gt;
+    &lt;/element&gt;
+    &lt;element name=&quot;webLoginElement&quot;&gt;
+
+    &lt;complexType&gt;
+    &lt;sequence&gt;
+    &lt;element ref=&quot;tns:user_nameElement&quot;/&gt;
+    &lt;element ref=&quot;tns:user_passwordElement&quot;/&gt;
+    &lt;/sequence&gt;
+    &lt;/complexType&gt;
+
+    &lt;/element&gt;
+    &lt;element name=&quot;user_nameElement&quot; type=&quot;xsd:string&quot;/&gt;
+    &lt;element name=&quot;user_passwordElement&quot; type=&quot;xsd:string&quot;/&gt;
+    &lt;element name=&quot;soap_session_idElement&quot; type=&quot;xsd:string&quot;/&gt;
+    &lt;element name=&quot;web_user_nameElement&quot; type=&quot;xsd:string&quot;/&gt;
+    &lt;/schema&gt;&lt;/types&gt;
+
+    &lt;message name=&quot;LoginEndpoint_webLogin&quot;&gt;
+    &lt;part name=&quot;parameters&quot; element=&quot;ns2:webLoginElement&quot;/&gt;
+    &lt;/message&gt;
+    &lt;message name=&quot;LoginEndpoint_webLoginResponse&quot;&gt;
+    &lt;part name=&quot;result&quot; element=&quot;ns2:returnWebLoginElement&quot;/&gt;
+    &lt;/message&gt;
+
+    &lt;portType name=&quot;LoginEndpoint&quot;&gt;
+    &lt;operation name=&quot;webLogin&quot;&gt;
+    &lt;input message=&quot;tns:LoginEndpoint_webLogin&quot; name=&quot;LoginEndpoint_webLogin&quot;/&gt;
+    &lt;output message=&quot;tns:LoginEndpoint_webLoginResponse&quot; name=&quot;LoginEndpoint_webLoginResponse&quot;/&gt;
+    &lt;/operation&gt;
+    &lt;/portType&gt;
+
+    &lt;binding name=&quot;LoginEndpointBinding&quot; type=&quot;tns:LoginEndpoint&quot;&gt;
+    &lt;soap:binding transport=&quot;http://schemas.xmlsoap.org/soap/http&quot; style=&quot;document&quot;/&gt;
+    &lt;operation name=&quot;webLogin&quot;&gt;
+    &lt;soap:operation soapAction=&quot;webLogin&quot;/&gt;
+    &lt;input name=&quot;LoginEndpoint_webLogin&quot;&gt;
+    &lt;soap:body use=&quot;literal&quot;/&gt;
+
+    &lt;/input&gt;
+    &lt;output name=&quot;LoginEndpoint_webLoginResponse&quot;&gt;
+    &lt;soap:body use=&quot;literal&quot;/&gt;
+    &lt;/output&gt;
+    &lt;/operation&gt;
+    &lt;/binding&gt;
+
+    &lt;service name=&quot;LoginService&quot;&gt;
+    &lt;port name=&quot;LoginEndpointPort&quot; binding=&quot;tns:LoginEndpointBinding&quot;&gt;
+    &lt;soap:address location=&quot;http://localhost:8080/axis2/services/LoginService&quot;/&gt;&lt;/port&gt;
+    &lt;/service&gt;&lt;/definitions&gt;
+</pre>
+Place the above file, named LoginEndpoint.wsdl, in the directory
+'wsdl' which is also inside the 'bin' directory. Run the wsdl2java
+command via the ant task defined above (&gt;ant wsdl2java), and
+there will be a directory called 'output' created. This directory
+contains the WSDL2Java generated source.
+<p>An important detail is that an XMLBean class file is also
+generated by WSDL2Java, TypeSystemHolder.class. That file is placed
+into build/classes by the above ant task and will be needed to
+compile the generated sources. A frequent problem is users get an
+error such as:</p>
+<p><em><b>ClassNotFoundException : Cannot load SchemaTypeSystem.
+Unable to load class with name
+schemaorg_apache_xmlbeans.system.s68C41DB812F52C975439BA10FE4FEE54.TypeSystemHolder.
+Make sure the generated binary files are on the
+classpath.</b></em></p>
+<p>The TypeSystemHolder.class generated by WSDL2Java must be placed
+in your classpath in order to avoid this error.</p>
+<p>The next step is to modify the generated Skeleton Java Source
+file - the Web service. This file as generated returns null and
+needs to be updated to contain the business logic.</p>
+<p>After the WSDL2Java command runs the file LoginEndpoint.wsdl,
+edit the following file:</p>
+<p>output/src/org/example/types/LoginServiceSkeleton.java. You
+should see the following code:</p>
+<pre class="code">
+/**
+    * LoginServiceSkeleton.java
+    *
+    * This file was auto-generated from WSDL
+    * by the Apache Axis2 version: 1.0-RC4 Apr 28, 2006 (05:23:23 IST)
+    */
+    package org.example.types;
+    /**
+    * LoginServiceSkeleton java skeleton for the axisService
+    */
+    public class LoginServiceSkeleton {
+
+
+    /**
+    * Auto generated method signature
+
+    * @param param0
+
+    */
+    public login.types.ReturnWebLoginElementDocument webLogin
+    (login.types.WebLoginElementDocument param0 )
+
+    {
+    //Todo fill this with the necessary business logic
+    throw new java.lang.UnsupportedOperationException();
+    }
+
+    }
+</pre>
+<p>Replace the contents of this file with the following, which uses
+the complex types generated by WSDL2Java and the example wsdl
+file:</p>
+<pre class="code">
+/**
+    * LoginServiceSkeleton.java
+    *
+    * This file was auto-generated from WSDL
+    * by the Apache Axis2 version: 1.0-RC4 Apr 28, 2006 (05:23:23 IST)
+    */
+    package org.example.types;
+    import login.types.ReturnWebLoginElementDocument;
+    import login.types.ReturnWebLoginElementDocument.*;
+    import login.types.WebLoginElementDocument;
+    import login.types.WebLoginElementDocument.*;
+
+    /**
+    * Auto generated java skeleton for the service by the Axis code generator
+    */
+    public class LoginServiceSkeleton {
+
+    /**
+    * Auto generated method signature
+
+    * @param webLoginElementDocument changed from param0
+
+    */
+    public ReturnWebLoginElementDocument webLogin
+    (WebLoginElementDocument webLoginElementDocument ){
+
+    //Todo fill this with the necessary business logic
+    System.out.println(&quot;LoginServiceSkeleton.webLogin reached successfully!&quot;);
+
+    // Get parameters passed in
+    WebLoginElement webLoginElement = webLoginElementDocument.getWebLoginElement();
+    String userName = webLoginElement.getUserNameElement();
+    String password = webLoginElement.getUserPasswordElement();
+    System.out.println(&quot;LoginServiceSkeleton.webLogin userName: &quot; + userName);
+    System.out.println(&quot;LoginServiceSkeleton.webLogin password: &quot; + password);
+
+    // input paramaters would be used here
+
+    // prepare output
+    ReturnWebLoginElementDocument retDoc =
+    ReturnWebLoginElementDocument.Factory.newInstance();
+
+    ReturnWebLoginElement retElement = ReturnWebLoginElement.Factory.newInstance();
+
+    retElement.setWebUserNameElement(&quot;joe sixpack&quot;);
+    retElement.setSoapSessionIdElement(&quot;some_random_string&quot;);
+    System.out.println(&quot;validate retElement: &quot; + retElement.validate());
+
+    retDoc.setReturnWebLoginElement(retElement);
+    System.out.println(&quot;validate retDoc: &quot; + retDoc.validate());
+
+    System.out.println(&quot;LoginServiceSkeleton.webLogin returning...&quot;);
+
+    return retDoc;
+
+    }
+    }
+</pre>
+<p>The next steps assume the axis2.war has been deployed and has
+expanded in a servlet container.</p>
+<p>Run the 'jar_wsdl' ant task from the example build.xml (&gt;ant
+jar_wsdl), which generates a jar file axis2_example_wsdl.jar in the
+'bin/lib' directory. This jar will be used to compile the client,
+and also will be placed in the servlet container.</p>
+<p>Next, run the 'aar' ant task from the example build.xml (&gt;ant
+aar), which generates the deployable axis2 Web service. Place
+dist/LoginEndpoint.aar into axis2/WEB-INF/services . Place
+lib/axis2_example_wsdl.jar into axis2/WEB-INF/lib . Verify the
+happy axis page loaded the services correctly - there should be the
+service 'LoginEndpoint' with the available operation 'webLogin'
+displayed.</p>
+<p>The last step is to create and run the client. In the src
+directory create the file org.client.LoginClient.java, with the
+contents below:</p>
+<pre class="code">
+package org.client;
+
+    import org.apache.axis2.AxisFault;
+
+    import login.types.ReturnWebLoginElementDocument;
+    import login.types.ReturnWebLoginElementDocument.*;
+    import login.types.WebLoginElementDocument;
+    import login.types.WebLoginElementDocument.*;
+    import org.example.types.LoginServiceStub;
+
+    /**
+    * Login.
+    *
+    */
+    public class LoginClient {
+
+    public static void main(String[] args) {
+    try {
+
+    System.out.println(&quot;webLogin, firing...&quot;);
+    LoginServiceStub stub = new LoginServiceStub();
+
+    WebLoginElementDocument webLoginElementDocument
+    = WebLoginElementDocument.Factory.newInstance();
+    WebLoginElement webLoginElement =
+    WebLoginElement.Factory.newInstance();
+    webLoginElement.setUserNameElement(&quot;joe&quot;);
+    webLoginElement.setUserPasswordElement(&quot;sixpack&quot;);
+
+    webLoginElementDocument.setWebLoginElement(webLoginElement);
+
+    System.out.println(&quot;validate: &quot; + webLoginElement.validate());
+    stub.webLogin(webLoginElementDocument);
+
+    ReturnWebLoginElementDocument returnWebLoginElementDocument =
+    stub.webLogin(webLoginElementDocument);
+
+    System.out.println(&quot;Client returned&quot;);
+
+    ReturnWebLoginElementDocument.ReturnWebLoginElement
+    retElement = returnWebLoginElementDocument.getReturnWebLoginElement();
+
+    System.out.println(&quot;WebUserName: &quot; + retElement.getWebUserNameElement());
+    System.out.println(&quot;SOAPSessionId: &quot; + retElement.getSoapSessionIdElement());
+    System.out.println(&quot;webLogin, completed!!!&quot;);
+
+    } catch (AxisFault axisFault) {
+    axisFault.printStackTrace();
+    } catch (Exception ex) {
+    ex.printStackTrace();
+    }
+    }
+    }
+</pre>
+<p>Now run the ant task 'runLogin' (&gt;ant runLogin). The
+following output should appear:</p>
+<pre class="code">
+runLogin:
+    [echo] running the webLogin client
+    [java] webLogin, firing...
+    [java] validate: true
+    [java] Client returned
+    [java] WebUserName: joe sixpack
+    [java] SOAPSessionId: some_random_string
+    [java] webLogin, completed!!!
+</pre>
+<a name="appendix"></a>
+<h2>Appendix</h2>
+<ul>
+<li>Eclipse reference - <a href="http://www.eclipse.org/">http://www.eclipse.org/</a></li>
+<li>Custom Ant Tasks - <a href="http://ant.apache.org/manual/develop.html">http://ant.apache.org/manual/develop.html</a></li>
+</ul>
+
 </html>
       </div>
     </div>

Modified: webservices/axis2/site/tools/1_3/eclipse/servicearchiver-plugin.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/tools/1_3/eclipse/servicearchiver-plugin.html?rev=652665&r1=652664&r2=652665&view=diff
==============================================================================
--- webservices/axis2/site/tools/1_3/eclipse/servicearchiver-plugin.html (original)
+++ webservices/axis2/site/tools/1_3/eclipse/servicearchiver-plugin.html Thu May  1 14:20:27 2008
@@ -271,135 +271,135 @@
     </div>
     <div id="bodyColumn">
       <div id="contentBox">
-        <html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta name="generator" content="HTML Tidy for Windows (vers 14 June 2007), see www.w3.org"></meta>
-<meta http-equiv="content-type" content=""></meta>
-Service Archive Generator Wizard Guide for Eclipse
-Plug-in
-<link href="../../../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></link>
-</head>
-
-<h1>Service Archive Generator Wizard Guide for Eclipse Plug-in</h1>
-<p>This document will guide you through the installation and usage
-of the archive generator Eclipse plug-in.</p>
-<p><a href="http://ws.apache.org/axis2/tools/index.html">[Download Plugin Tool]</a></p>
-<h2>Content</h2>
-<ul>
-<li><a href="#intro">Introduction</a></li>
-<li><a href="#installation">Installation</a></li>
-<li><a href="#operation">Operation</a></li>
-</ul>
-<a name="intro"></a>
-<h2>Introduction</h2>
-As part of the Axis2 tool set, the service archive generator is
-an important tool that allows the generation of service archives
-(&quot;aar&quot; file or a &quot;jar&quot; files) that can be deployed as a web
-services to the Axis2.
-<a name="installation"></a>
-<h2>Installation</h2>
-One can easily <a href="http://ws.apache.org/axis2/tools/index.html">download</a> the
-plugin
-If one needs to build the plug-in from source, Maven2 and Ant
-builds arevailabe. Please refer the readme.txt located at
-module/tools on Axis2 source.
-<p>Once you've obtained the plug-in just unzip the content of the
-plug-in archive to the Eclipse plug-in directory (if it is the
-zipped-binary version) or copy the necessary folders to the Eclipse
-plug-in directory and restart Eclipse.</p>
-<p><strong>NOTE</strong> : This plug-in works on Eclipse version
-3.1 and upwards, also the java version should be 1.4 or higher. The
-provided screen shots may slightly differ with what the user would
-actually see but the functionality has not been changed.</p>
-<a name="operation"></a>
-<h2>Operation</h2>
-<p>If the plug-in is properly installed you should see a new wizard
-under the &quot;New&quot; section. (Use the File -&gt; New -&gt; Other or
-Ctrl + N )</p>
-<p><img border="0" src="images/ServiceWizardSelection.jpg"></img></p>
-<p>Selecting the wizard and pressing the &quot;Next&quot; button will start
-the service generator wizard. Following is the first page of the
-wizard.</p>
-<p><strong>Page 1:</strong></p>
-<p><img border="0" src="images/ServicePage1.jpg"></img></p>
-<p>Once the class file folder(which should be a folder in the
-file system) is browsed and selected, the &quot;Next&quot; button will be
-enabled and you can move to the next page. Note that you have the
-option of either including all the files or the class files only of
-the folder on page 1.</p>
-<p><strong>Page 2:</strong></p>
-<p>Page 2 of the wizard as seen below requires you to locate/browse
-the WSDL file. If you do not wish to add a WSDL file to the service
-archive, select skip WSDL, else you can select the location of the
-WSDL file by selecting the select WSDL option.</p>
-<p><img border="0" src="images/service_page2.jpg"></img></p>
-<p><strong>Page 3:</strong></p>
-<p>Select the services.xml file on this wizard page by browsing or
-select the option of generating service xml automatically, after
-which you can click &quot;Next&quot; button to go to the next page. Notice
-how the browsing option disables when the &quot;Generate service xml
-automatically&quot; check box is ticked.</p>
-<p><img border="0" src="images/service_page3.jpg"></img></p>
-
-<p><strong>Page 4:</strong></p>
-
-<p>The next step is to add the libraries. The library addition page
-looks like this :</p>
-<p><img border="0" src="images/service_page5.jpg"></img></p>
-<p>The library name (with full path) can be either typed on the
-text box or browsed for using the &quot;Browse&quot; button.</p>
-<p><img border="0" src="images/service_page5_browsed.jpg"></img></p>
-<p>Once there is a library name with full path on the text box, hit
-the &quot;Add&quot; button to add the library to the list. Added libraries
-should be displayed in the &quot;Added libraries&quot; list box. This way you
-can add as many external libraries as you wish. See the screen
-shots below.</p>
-<p><img border="0" src="images/service_page5_hl.jpg"></img></p>
-<p><img border="0" src="images/service_page5_added.jpg"></img></p>
-<p>If any added library needs to be removed, highlight it or in
-other words, select it from the &quot;Added libraries&quot; list and hit on
-the &quot;Remove&quot; button as shown below. Click on the &quot;Next&quot; button to
-proceed to the last page of the wizard if the user did not select
-to auto generate the services.xml file. If user select to auto
-generate the services.xml file then the services.xml option page
-will be displayed.</p>
-<p><img border="0" src="images/service_page5_remove.jpg"></img></p>
-<p><strong>Page 5:</strong></p>
-<p>This page only appears if the user select to generate the
-services.xml at page 3 of the wizard. If the user have selected a
-services.xml then the user will be directed to the last page of the
-wizard.</p>
-<p>After entering the correct service name and valid fully
-qualified class name, try to load the existing methods of that
-class by clicking the load button.</p>
-<p><img border="0" src="images/service_page4_load.jpg"></img></p>
-<p>If successfully loaded the user will be presented with a table
-at the bottom of the page with the details of the loaded class. By
-checking and unchecking the user can select the necessary methods
-to include in the services.xml</p>
-<p><img border="0" src="images/service_page4_table.jpg"></img></p>
-<p>By clicking on the search declared method only check box, the
-user can remove the inherited methods from the class. Click on the
-&quot;Next&quot; button to proceed to the last page of the wizard</p>
-<p><img border="0" src="images/service_page4_search_declared.jpg"></img></p>
-<p><strong>Page 6:</strong></p>
-<p>The last page of the wizard asks for the output file location
-and the output archive file name. To be able to finish the wizard,
-user must enter valid output file location and output file
-name.</p>
-<p><img border="0" src="images/service_page6.jpg"></img></p>
-<p>Once all the parameters are filled, hit the &quot;Finish&quot; button to
-complete the wizard and generate the service archive.</p>
-<p><img border="0" src="images/success_msg.jpg"></img></p>
-<p>If you see the above message, then you've successfully generated
-the service archive! This service archive can be hot deployed
-(deployed at run time) to the axis2</p>
-<h1>Appendix</h1>
-<ul>
-<li>Eclipse reference - <a href="http://www.eclipse.org/">http://www.eclipse.org/</a></li>
-<li>Custom Ant Tasks - <a href="http://ant.apache.org/manual/develop.html">http://ant.apache.org/manual/develop.html</a></li>
-</ul>
-
+        <html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta name="generator" content="HTML Tidy for Windows (vers 14 June 2007), see www.w3.org"></meta>
+<meta http-equiv="content-type" content=""></meta>
+Service Archive Generator Wizard Guide for Eclipse
+Plug-in
+<link href="../../../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></link>
+</head>
+
+<h1>Service Archive Generator Wizard Guide for Eclipse Plug-in</h1>
+<p>This document will guide you through the installation and usage
+of the archive generator Eclipse plug-in.</p>
+<p><a href="http://ws.apache.org/axis2/tools/index.html">[Download Plugin Tool]</a></p>
+<h2>Content</h2>
+<ul>
+<li><a href="#intro">Introduction</a></li>
+<li><a href="#installation">Installation</a></li>
+<li><a href="#operation">Operation</a></li>
+</ul>
+<a name="intro"></a>
+<h2>Introduction</h2>
+As part of the Axis2 tool set, the service archive generator is
+an important tool that allows the generation of service archives
+(&quot;aar&quot; file or a &quot;jar&quot; files) that can be deployed as a web
+services to the Axis2.
+<a name="installation"></a>
+<h2>Installation</h2>
+One can easily <a href="http://ws.apache.org/axis2/tools/index.html">download</a> the
+plugin
+If one needs to build the plug-in from source, Maven2 and Ant
+builds arevailabe. Please refer the readme.txt located at
+module/tools on Axis2 source.
+<p>Once you've obtained the plug-in just unzip the content of the
+plug-in archive to the Eclipse plug-in directory (if it is the
+zipped-binary version) or copy the necessary folders to the Eclipse
+plug-in directory and restart Eclipse.</p>
+<p><strong>NOTE</strong> : This plug-in works on Eclipse version
+3.1 and upwards, also the java version should be 1.4 or higher. The
+provided screen shots may slightly differ with what the user would
+actually see but the functionality has not been changed.</p>
+<a name="operation"></a>
+<h2>Operation</h2>
+<p>If the plug-in is properly installed you should see a new wizard
+under the &quot;New&quot; section. (Use the File -&gt; New -&gt; Other or
+Ctrl + N )</p>
+<p><img border="0" src="images/ServiceWizardSelection.jpg"></img></p>
+<p>Selecting the wizard and pressing the &quot;Next&quot; button will start
+the service generator wizard. Following is the first page of the
+wizard.</p>
+<p><strong>Page 1:</strong></p>
+<p><img border="0" src="images/ServicePage1.jpg"></img></p>
+<p>Once the class file folder(which should be a folder in the
+file system) is browsed and selected, the &quot;Next&quot; button will be
+enabled and you can move to the next page. Note that you have the
+option of either including all the files or the class files only of
+the folder on page 1.</p>
+<p><strong>Page 2:</strong></p>
+<p>Page 2 of the wizard as seen below requires you to locate/browse
+the WSDL file. If you do not wish to add a WSDL file to the service
+archive, select skip WSDL, else you can select the location of the
+WSDL file by selecting the select WSDL option.</p>
+<p><img border="0" src="images/service_page2.jpg"></img></p>
+<p><strong>Page 3:</strong></p>
+<p>Select the services.xml file on this wizard page by browsing or
+select the option of generating service xml automatically, after
+which you can click &quot;Next&quot; button to go to the next page. Notice
+how the browsing option disables when the &quot;Generate service xml
+automatically&quot; check box is ticked.</p>
+<p><img border="0" src="images/service_page3.jpg"></img></p>
+
+<p><strong>Page 4:</strong></p>
+
+<p>The next step is to add the libraries. The library addition page
+looks like this :</p>
+<p><img border="0" src="images/service_page5.jpg"></img></p>
+<p>The library name (with full path) can be either typed on the
+text box or browsed for using the &quot;Browse&quot; button.</p>
+<p><img border="0" src="images/service_page5_browsed.jpg"></img></p>
+<p>Once there is a library name with full path on the text box, hit
+the &quot;Add&quot; button to add the library to the list. Added libraries
+should be displayed in the &quot;Added libraries&quot; list box. This way you
+can add as many external libraries as you wish. See the screen
+shots below.</p>
+<p><img border="0" src="images/service_page5_hl.jpg"></img></p>
+<p><img border="0" src="images/service_page5_added.jpg"></img></p>
+<p>If any added library needs to be removed, highlight it or in
+other words, select it from the &quot;Added libraries&quot; list and hit on
+the &quot;Remove&quot; button as shown below. Click on the &quot;Next&quot; button to
+proceed to the last page of the wizard if the user did not select
+to auto generate the services.xml file. If user select to auto
+generate the services.xml file then the services.xml option page
+will be displayed.</p>
+<p><img border="0" src="images/service_page5_remove.jpg"></img></p>
+<p><strong>Page 5:</strong></p>
+<p>This page only appears if the user select to generate the
+services.xml at page 3 of the wizard. If the user have selected a
+services.xml then the user will be directed to the last page of the
+wizard.</p>
+<p>After entering the correct service name and valid fully
+qualified class name, try to load the existing methods of that
+class by clicking the load button.</p>
+<p><img border="0" src="images/service_page4_load.jpg"></img></p>
+<p>If successfully loaded the user will be presented with a table
+at the bottom of the page with the details of the loaded class. By
+checking and unchecking the user can select the necessary methods
+to include in the services.xml</p>
+<p><img border="0" src="images/service_page4_table.jpg"></img></p>
+<p>By clicking on the search declared method only check box, the
+user can remove the inherited methods from the class. Click on the
+&quot;Next&quot; button to proceed to the last page of the wizard</p>
+<p><img border="0" src="images/service_page4_search_declared.jpg"></img></p>
+<p><strong>Page 6:</strong></p>
+<p>The last page of the wizard asks for the output file location
+and the output archive file name. To be able to finish the wizard,
+user must enter valid output file location and output file
+name.</p>
+<p><img border="0" src="images/service_page6.jpg"></img></p>
+<p>Once all the parameters are filled, hit the &quot;Finish&quot; button to
+complete the wizard and generate the service archive.</p>
+<p><img border="0" src="images/success_msg.jpg"></img></p>
+<p>If you see the above message, then you've successfully generated
+the service archive! This service archive can be hot deployed
+(deployed at run time) to the axis2</p>
+<h1>Appendix</h1>
+<ul>
+<li>Eclipse reference - <a href="http://www.eclipse.org/">http://www.eclipse.org/</a></li>
+<li>Custom Ant Tasks - <a href="http://ant.apache.org/manual/develop.html">http://ant.apache.org/manual/develop.html</a></li>
+</ul>
+
 </html>
       </div>
     </div>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org