<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<!-- Generated by Apache Maven Doxia at Apr 17, 2012 --> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Apache Axis2 - | |
Code Generator Wizard Guide for Eclipse Plug-in</title> | |
<style type="text/css" media="all"> | |
@import url("../../css/maven-base.css"); | |
@import url("../../css/maven-theme.css"); | |
@import url("../../css/site.css"); | |
</style> | |
<link rel="stylesheet" href="../../css/print.css" type="text/css" media="print" /> | |
<meta name="Date-Revision-yyyymmdd" content="20120417" /> | |
<meta http-equiv="Content-Language" content="en" /> | |
</head> | |
<body class="composite"> | |
<div id="banner"> | |
<a href="http://www.apache.org/" id="bannerLeft"> | |
<img src="http://www.apache.org/images/asf_logo_wide.png" alt="Apache Axis2" /> | |
</a> | |
<a href="" id="bannerRight"> | |
<img src="../../images/axis.jpg" alt="Apache Axis2" /> | |
</a> | |
<div class="clear"> | |
<hr/> | |
</div> | |
</div> | |
<div id="breadcrumbs"> | |
<div class="xleft"> | |
<span id="publishDate">Last Published: 2012-04-17</span> | |
| <span id="projectVersion">Version: 1.6.2</span> | |
</div> | |
<div class="xright"> <a href="../../index.html" title="Axis2/Java">Axis2/Java</a> | |
| | |
<a href="http://www.apache.org" class="externalLink" title="Apache">Apache</a> | |
</div> | |
<div class="clear"> | |
<hr/> | |
</div> | |
</div> | |
<div id="leftColumn"> | |
<div id="navcolumn"> | |
<h5>Axis2/Java</h5> | |
<ul> | |
<li class="none"> | |
<a href="../../index.html" title="Home">Home</a> | |
</li> | |
</ul> | |
<h5>Downloads</h5> | |
<ul> | |
<li class="none"> | |
<a href="../../download.cgi" title="Releases">Releases</a> | |
</li> | |
<li class="none"> | |
<a href="../../modules/index.html" title="Modules">Modules</a> | |
</li> | |
<li class="none"> | |
<a href="../../tools/index.html" title="Tools">Tools</a> | |
</li> | |
</ul> | |
<h5>Documentation</h5> | |
<ul> | |
<li class="none"> | |
<a href="../../docs/toc.html" title="Table of Contents">Table of Contents</a> | |
</li> | |
<li class="none"> | |
<a href="../../docs/installationguide.html" title="Installation Guide">Installation Guide</a> | |
</li> | |
<li class="none"> | |
<a href="../../docs/quickstartguide.html" title="QuickStart Guide">QuickStart Guide</a> | |
</li> | |
<li class="none"> | |
<a href="../../docs/userguide.html" title="User Guide">User Guide</a> | |
</li> | |
<li class="none"> | |
<a href="../../docs/jaxws-guide.html" title="JAXWS Guide">JAXWS Guide</a> | |
</li> | |
<li class="none"> | |
<a href="../../docs/pojoguide.html" title="POJO Guide">POJO Guide</a> | |
</li> | |
<li class="none"> | |
<a href="../../docs/spring.html" title="Spring Guide">Spring Guide</a> | |
</li> | |
<li class="none"> | |
<a href="../../docs/webadminguide.html" title="Web Administrator's Guide">Web Administrator's Guide</a> | |
</li> | |
<li class="none"> | |
<a href="../../docs/migration.html" title="Migration Guide (from Axis1)">Migration Guide (from Axis1)</a> | |
</li> | |
</ul> | |
<h5>Resources</h5> | |
<ul> | |
<li class="none"> | |
<a href="../../faq.html" title="FAQ">FAQ</a> | |
</li> | |
<li class="none"> | |
<a href="../../articles.html" title="Articles">Articles</a> | |
</li> | |
<li class="none"> | |
<a href="http://wiki.apache.org/ws/FrontPage/Axis2/" class="externalLink" title="Wiki">Wiki</a> | |
</li> | |
<li class="none"> | |
<a href="../../refLib.html" title="Reference Library">Reference Library</a> | |
</li> | |
<li class="none"> | |
<a href="../../api/index.html" title="Online Java Docs">Online Java Docs</a> | |
</li> | |
</ul> | |
<h5>Get Involved</h5> | |
<ul> | |
<li class="none"> | |
<a href="../../overview.html" title="Overview">Overview</a> | |
</li> | |
<li class="none"> | |
<a href="../../svn.html" title="Checkout the Source">Checkout the Source</a> | |
</li> | |
<li class="none"> | |
<a href="../../mail-lists.html" title="Mailing Lists">Mailing Lists</a> | |
</li> | |
<li class="none"> | |
<a href="../../release-process.html" title="Release Process">Release Process</a> | |
</li> | |
<li class="none"> | |
<a href="../../guidelines.html" title="Developer Guidelines">Developer Guidelines</a> | |
</li> | |
<li class="none"> | |
<a href="../../siteHowTo.html" title="Build the Site">Build the Site</a> | |
</li> | |
</ul> | |
<h5>Project Information</h5> | |
<ul> | |
<li class="none"> | |
<a href="../../team-list.html" title="Project Team">Project Team</a> | |
</li> | |
<li class="none"> | |
<a href="../../issue-tracking.html" title="Issue Tracking">Issue Tracking</a> | |
</li> | |
<li class="none"> | |
<a href="http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/" class="externalLink" title="Source Code">Source Code</a> | |
</li> | |
<li class="none"> | |
<a href="../../thanks.html" title="Acknowledgements">Acknowledgements</a> | |
</li> | |
<li class="none"> | |
<a href="http://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink" title="License">License</a> | |
</li> | |
<li class="none"> | |
<a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">Sponsorship</a> | |
</li> | |
<li class="none"> | |
<a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks">Thanks</a> | |
</li> | |
<li class="none"> | |
<a href="http://www.apache.org/security/" class="externalLink" title="Security">Security</a> | |
</li> | |
</ul> | |
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"> | |
<img class="poweredBy" alt="Built by Maven" src="../../images/logos/maven-feather.png" /> | |
</a> | |
</div> | |
</div> | |
<div id="bodyColumn"> | |
<div id="contentBox"> | |
<!-- ~ 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. --> | |
<h1>Code Generator Wizard Guide for Eclipse Plug-in</h1> | |
<p>This document explains the usage of this code generator plug-in | |
for Eclipse. In other words, this document will guide you through | |
the operations of generating a WSDL file from a Java class and/or | |
generating a Java class file from a WSDL file.</p> | |
<p><a href="../index.html">[Download Plugin Tool]</a></p> | |
<ul><li><a href="#Introduction">Introduction</a></li><li><a href="#Installation">Installation</a></li><li><a href="#Operation">Operation</a><ul><li><a href="#WSDL2Java">WSDL2Java</a></li><li><a href="#Java2WSDL">Java2WSDL</a></li></ul></li><li><a href="#Appendix">Appendix</a></li></ul> | |
<div class="section"><h2>Introduction<a name="Introduction"></a></h2> | |
<p>The Axis2 code generator comes built-in with an <a class="externalLink" href="http://www.eclipse.org">Eclipse</a> plug-in. This plug-in can be | |
used to generate a WSDL file from a java class (Java2WSDL) and/or a | |
java class file from a WSDL (WSDL2Java). First you need to install | |
the plug-in. The instructions for the installation process are | |
given below.</p> | |
</div> | |
<div class="section"><h2>Installation<a name="Installation"></a></h2> | |
<p> | |
Installation instructions for the plugin can be found | |
<a href="plugin-installation.html">here</a>. | |
</p> | |
</div> | |
<div class="section"><h2>Operation<a name="Operation"></a></h2> | |
<div class="section"><h3>WSDL2Java<a name="WSDL2Java"></a></h3> | |
<p>If the plug-in is properly installed you should see a new wizard | |
under the "New" section.(use the File -> New -> Other or Ctrl | |
+ N )</p> | |
<p><img src="images/wsdl2java-screen0.png" alt="wsdl2java-screen0" /></p> | |
<p>Selecting the wizard and pressing the "Next" button will start | |
the code generator wizard. Following is the first wizard page.</p> | |
<p><b>Page 1:</b></p> | |
<p><img src="images/wsdl2java-screen1.png" alt="wsdl2java-screen1" /></p> | |
<p>Selecting the "Generate Java source code from WSDL file" option | |
and clicking "Next" leads to the following page.</p> | |
<p><b>WSDL2Java Page 2 :</b></p> | |
<p><img src="images/wsdl2java-screen2.png" alt="wsdl2java-screen2" /></p> | |
<p>To move on to the next page the WSDL file location must be | |
given. The "Browse" button can be used to easily browse for a file | |
rather than typing the whole path.</p> | |
<p><b>WSDL2Java Page 3 :</b></p> | |
<p>Once the WSDL file is selected, the next page will take you to | |
the page from where <b>codegen options</b> are to be | |
selected. By far this is the most important page in this wizard. | |
This page determines the characteristics of the code being | |
generated.</p> | |
<p>Novices need not worry about these options since the most common | |
options are defaulted, but advanced users will find it very easy to | |
turn the knobs using these options.</p> | |
<p><img src="images/wsdl2java-screen3.png" alt="wsdl2java-screen3" /></p> | |
<p>What advanced users can do is select custom from the select | |
codegen options drop down list and then change/edit the fields that | |
you need.</p> | |
<p><img src="images/wsdl2java-screen31.png" alt="wsdl2java-screen31" /></p> | |
<p>Once the options are selected, only the final step of the code | |
generation is left which is the selection of the output file | |
location.</p> | |
<p><b>WSDL2Java Page 4 :</b></p> | |
<p>Here you can select the output file path by typing or browsing | |
using the "Browse" button. You have the option of browsing only | |
eclipse workspace projects by selecting the "Add the source to a | |
project on current eclipse workspace" radio button. Or else you | |
have the option to save the codegen resutls to file system</p> | |
<p><img src="images/wsdl2java-screen4.png" alt="wsdl2java-screen4" /></p> | |
<p>Here also you have the option to add some value to the codegen | |
results. If you have enabled the check box "Add Axis2 libraries to | |
the codegen result project" then all other controls below will get | |
enabled. What you can do is point the downloaded Axis2_HOME | |
location via the "Browse" button. Then you can verify the | |
availability of the Axis2 libs by clicking on the "Check Libs" | |
button. If all goes well then you can add the axis 2 libs to the | |
codegen results location. Another option is available to generate a | |
jar file if the user needs to add the codegen results to a project | |
as a compiled jar file to the selected locations lib directory.</p> | |
<p><img src="images/wsdl2java-screen41.png" alt="wsdl2java-screen41" /></p> | |
<p>When the output file location is selected, the "Finish" button | |
will be enabled. Clicking the "Finish" button will generate the | |
code and a message box will pop up acknowledging the success. Well | |
Done! You've successfully completed Axis2 code generation.</p> | |
</div> | |
<div class="section"><h3>Java2WSDL<a name="Java2WSDL"></a></h3> | |
<p><b>Page 1:</b></p> | |
<p>For this operation you need to select the option which says | |
"Generate a WSDL from a Java source file"</p> | |
<p><img src="images/java2wsdl-screen0.png" alt="java2wsdl-screen0" /></p> | |
<p>Then click the "Next" button which will lead to the next page | |
below.</p> | |
<p><b>Java2WSDL Page 2:</b></p> | |
<p><img src="images/java2wsdl-screen1.png" alt="java2wsdl-screen1" /></p> | |
<p>In this page one needs to select the class to be exposed and the | |
relevant jar files /classes to be loaded as the classpath. After | |
the libraries have been set, the "Test Class Loading" button must | |
be clicked in order to test whether the class is loadable. Unless | |
the class loading is successful proceeding to the "Next" button | |
will not be enabled.</p> | |
<p>Once the classloading is successful and "Next" button is clicked | |
the page below will appear.</p> | |
<p><b>Java2WSDL Page 3:</b></p> | |
<p>This page allows the parameters to be modified by setting the | |
options for the generator.</p> | |
<p><img src="images/java2wsdl-screen2.png" alt="java2wsdl-screen2" /></p> | |
<p><b>Java2WSDL Page 4:</b></p> | |
<p>Here you can select the output file path by typing or browsing | |
using the "Browse" button. You have the option of browsing only | |
Eclipse workspace projects by selecting the "Add the source to a | |
project on current eclipse workspace" radio button . Or else you | |
have the option to save the codegen resutls to file system. Once | |
the output file location and the output WSDL file name is added you | |
can click the "Finish" button to complete generation.</p> | |
<p><img src="images/java2wsdl-screen3.png" alt="java2wsdl-screen3" /></p> | |
<p>If a message box pops up acknowledging the success, then you've | |
successfully completed the Java2WSDL code generation.</p> | |
</div> | |
</div> | |
<div class="section"><h2>Appendix<a name="Appendix"></a></h2> | |
<ul> | |
<li>Eclipse reference - <a class="externalLink" href="http://www.eclipse.org/">http://www.eclipse.org/</a></li> | |
<li>Custom Ant Tasks - <a class="externalLink" href="http://ant.apache.org/manual/develop.html">http://ant.apache.org/manual/develop.html</a></li> | |
</ul> | |
</div> | |
</div> | |
</div> | |
<div class="clear"> | |
<hr/> | |
</div> | |
<div id="footer"> | |
<div class="xright">Copyright © 2004-2012 | |
<a href="http://www.apache.org/">The Apache Software Foundation</a>. | |
All Rights Reserved. | |
</div> | |
<div class="clear"> | |
<hr/> | |
</div> | |
</div> | |
</body> | |
</html> |