| <!DOCTYPE html> | |
| <!-- | |
| | Generated by Apache Maven Doxia Site Renderer 2.1.0 from src/site/xdoc/docs/userguide-installingtesting.xml at 2026-10-13 | |
| | Rendered using Apache Maven Fluido Skin 2.0.0-M11 | |
| --> | |
| <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <meta name="generator" content="Apache Maven Doxia Site Renderer 2.1.0" /> | |
| <title>Apache Axis2 User's Guide-Installing and Testing Client Code – Apache Axis2</title> | |
| <link rel="stylesheet" href="../css/apache-maven-fluido-2.0.0-M11.min.css" /> | |
| <link rel="stylesheet" href="../css/site.css" /> | |
| <link rel="stylesheet" href="../css/print.css" media="print" /> | |
| <script src="../js/apache-maven-fluido-2.0.0-M11.min.js"></script> | |
| <meta name="generator" content="HTML Tidy for Windows (vers 14 June 2007), see www.w3.org" /><meta http-equiv="content-type" content="" /> </head> | |
| <body> | |
| <div class="container-fluid container-fluid-top"> | |
| <header> | |
| <div id="banner"> | |
| <div class="pull-left"><div id="bannerLeft"><h1><a href="https://www.apache.org/"><img class="class java.lang.Object" src="https://www.apache.org/images/asf_logo_wide.png" /> Apache Axis2</a></h1></div></div> | |
| <div class="pull-right"><div id="bannerRight"><h1><a href="https://axis.apache.org/axis2/java/core/"><img class="class java.lang.Object" src="https://axis.apache.org/axis2/java/core/images/axis.jpg" /></a></h1></div></div> | |
| <div class="clear"><hr/></div> | |
| </div> | |
| <div id="breadcrumbs"> | |
| <ul class="breadcrumb"> | |
| <li id="publishDate">Last Published: 2026-10-13<span class="divider">|</span> | |
| </li> | |
| <li id="projectVersion">Version: 2.0.2<span class="divider">|</span></li> | |
| <li><a href="https://www.apache.org" class="externalLink">Apache</a><span class="divider">/</span></li> | |
| <li><a href="../index.html">Axis2/Java</a><span class="divider">/</span></li> | |
| <li class="active">Apache Axis2 User's Guide-Installing and Testing Client Code</li> | |
| </ul> | |
| </div> | |
| </header> | |
| <div class="row-fluid"> | |
| <header id="leftColumn" class="span2"> | |
| <nav class="well sidebar-nav"> | |
| <ul class="nav nav-list"> | |
| <li class="nav-header">Axis2/Java</li> | |
| <li><a href="../index.html">Home</a></li> | |
| <li><a href="../download.html">Downloads</a></li> | |
| <li><a href="javascript:void(0)"><span class="icon-chevron-down"></span>Release Notes</a> | |
| <ul class="nav nav-list"> | |
| <li><a href="../release-notes/1.6.1.html">1.6.1</a></li> | |
| <li><a href="../release-notes/1.6.2.html">1.6.2</a></li> | |
| <li><a href="../release-notes/1.6.3.html">1.6.3</a></li> | |
| <li><a href="../release-notes/1.6.4.html">1.6.4</a></li> | |
| <li><a href="../release-notes/1.7.0.html">1.7.0</a></li> | |
| <li><a href="../release-notes/1.7.1.html">1.7.1</a></li> | |
| <li><a href="../release-notes/1.7.2.html">1.7.2</a></li> | |
| <li><a href="../release-notes/1.7.3.html">1.7.3</a></li> | |
| <li><a href="../release-notes/1.7.4.html">1.7.4</a></li> | |
| <li><a href="../release-notes/1.7.5.html">1.7.5</a></li> | |
| <li><a href="../release-notes/1.7.6.html">1.7.6</a></li> | |
| <li><a href="../release-notes/1.7.7.html">1.7.7</a></li> | |
| <li><a href="../release-notes/1.7.8.html">1.7.8</a></li> | |
| <li><a href="../release-notes/1.7.9.html">1.7.9</a></li> | |
| <li><a href="../release-notes/1.7.10.html">1.7.10</a></li> | |
| <li><a href="../release-notes/1.8.0.html">1.8.0</a></li> | |
| <li><a href="../release-notes/1.8.1.html">1.8.1</a></li> | |
| <li><a href="../release-notes/1.8.2.html">1.8.2</a></li> | |
| <li><a href="../release-notes/2.0.0.html">2.0.0</a></li> | |
| <li><a href="../release-notes/2.0.1.html">2.0.1</a></li> | |
| <li><a href="../release-notes/2.0.2.html">2.0.2</a></li> | |
| </ul></li> | |
| <li><a href="../modules/index.html">Modules</a></li> | |
| <li><a href="../tools/index.html">Tools</a></li> | |
| <li class="nav-header">Documentation</li> | |
| <li><a href="../docs/toc.html">Table of Contents</a></li> | |
| <li><a href="../docs/installationguide.html">Installation Guide</a></li> | |
| <li><a href="../docs/quickstartguide.html">QuickStart Guide</a></li> | |
| <li><a href="../docs/userguide.html">User Guide</a></li> | |
| <li><a href="../docs/jaxws-guide.html">JAXWS Guide</a></li> | |
| <li><a href="../docs/pojoguide.html">POJO Guide</a></li> | |
| <li><a href="../docs/spring.html">Spring Guide</a></li> | |
| <li><a href="../docs/webadminguide.html">Web Administrator's Guide</a></li> | |
| <li><a href="../docs/migration.html">Migration Guide (from Axis1)</a></li> | |
| <li class="nav-header">Resources</li> | |
| <li><a href="../faq.html">FAQ</a></li> | |
| <li><a href="https://github.com/apache/axis-axis2-java-core" class="externalLink">Source Code</a></li> | |
| <li class="nav-header">Get Involved</li> | |
| <li><a href="../overview.html">Overview</a></li> | |
| <li><a href="../mailing-lists.html">Mailing Lists</a></li> | |
| <li><a href="../release-process.html">Release Process</a></li> | |
| <li><a href="../guidelines.html">Developer Guidelines</a></li> | |
| <li><a href="../siteHowTo.html">Build the Site</a></li> | |
| <li class="nav-header">Project Information</li> | |
| <li><a href="https://github.com/apache/axis-axis2-java-core/graphs/contributors" class="externalLink">Contributors</a></li> | |
| <li><a href="https://issues.apache.org/jira/projects/AXIS2/issues" class="externalLink">Issues</a></li> | |
| <li class="nav-header">Apache</li> | |
| <li><a href="https://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink">License</a></li> | |
| <li><a href="https://www.apache.org/foundation/sponsorship.html" class="externalLink">Sponsorship</a></li> | |
| <li><a href="https://www.apache.org/foundation/thanks.html" class="externalLink">Thanks</a></li> | |
| <li><a href="https://www.apache.org/security/" class="externalLink">Security</a></li> | |
| </ul> | |
| </nav> | |
| <div class="well sidebar-nav"> | |
| <div id="poweredBy"> | |
| <div class="clear"></div> | |
| <div class="clear"></div> | |
| <a href="https://maven.apache.org/" class="builtBy" target="_blank"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a> | |
| </div> | |
| </div> | |
| </header> | |
| <main id="bodyColumn" class="span10"> | |
| <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
| <a id="installingtesting"></a> <section><a id="Apache_Axis2_User.27s_Guide_-_Installing_and_Testing_Client_Code"></a> | |
| <h1>Apache Axis2 User's Guide - Installing and Testing Client Code</h1> | |
| <p>The best way to make sure that your system is running Apache Axis2 is to install and test both a service and a client. The process involves the following steps:</p> | |
| <section><a id="Content"></a> | |
| <h2>Content</h2> | |
| <ul> | |
| <li><a href="userguide.html#intro">Introducing Axis2</a><br /> | |
| <ul> | |
| <li><a href="userguide.html#whatis">What is Axis2?</a></li> | |
| <li><a href="userguide.html#underhood">What's under the hood?</a></li> | |
| <li><a href="userguide.html#handlessoap">How Axis2 handles SOAP messages</a></li> | |
| <li><a href="userguide.html#distributions">Axis2 distributions</a></li> | |
| <li><a href="userguide.html#sbd">The Axis2 Standard Binary Distribution</a></li> | |
| <li><a href="userguide.html#hierarchy">Axis2.war Directory Hierarchy</a></li> | |
| <li><a href="userguide.html#clients">Axis2 and clients</a></li> | |
| </ul> | |
| </li> | |
| <li><a href="userguide-installingtesting.html#installingtesting"><strong>Installing and testing client code</strong></a></li> | |
| <li><a href="userguide-introtoservices.html#introservices">Introduction to Services</a><br /> | |
| <ul> | |
| <li><a href="userguide-introtoservices.html#messageexchange">Message Exchange Patterns</a></li> | |
| </ul> | |
| </li> | |
| <li><a href="userguide-creatingclients.html#createclients">Creating Clients</a><br /> | |
| <ul> | |
| <li><a href="userguide-creatingclients.html#choosingclient">Choosing a Client Generation Method</a></li> | |
| <li><a href="userguide-creatingclients.html#generating">Generating Clients</a></li> | |
| <li><a href="userguide-creatingclients.html#adb">Axis Data Binding (ADB)</a></li> | |
| </ul> | |
| </li> | |
| <li><a href="userguide-buildingservices.html#buildservices">Building Services</a><br /> | |
| <ul> | |
| <li><a href="userguide-buildingservices.html#getcomfortable">Getting Comfortable with the Available Options</a></li> | |
| <li><a href="userguide-buildingservices.html#createscratch">Creating a service from scratch</a></li> | |
| <li><a href="userguide-buildingservices.html#deploypojo">Deploying Plain Old Java Objects</a></li> | |
| <li><a href="userguide-buildingservices.html#deployrun">Deploying and running an Axis2 service created from WSDL</a></li> | |
| </ul> | |
| </li> | |
| <li><a href="userguide-samples.html">Samples</a></li> | |
| <li><a href="userguide-forfurtherstudy.html">For Further Study</a></li> | |
| </ul> | |
| <p><b>The Short Story:</b></p> | |
| <ol style="list-style-type: decimal;"> | |
| <li>Install Apache Axis2 in a suitable container, such as Apache Tomcat, by copying the axis2.war file to the webapps directory.</li> | |
| <li>Install the service into the Axis2 application by copying the *.aar file into the Axis2 services directory.</li> | |
| <li>Install the client on the system on which you want to run it, and make sure all the Axis2 libraries are on the CLASSPATH.</li> | |
| <li>Run the client.</li> | |
| </ol> | |
| <p><b>The Long Story:</b></p> | |
| <p>Start by installing a suitable container, such as <a href="https://tomcat.apache.org/" class="externalLink">Apache Tomcat</a> 11. Any Jakarta EE servlet container supporting Servlet 6.0 will do (Axis2 is tested on Tomcat 11 and WildFly 32 and 41). To install Apache Axis2 on the server, <a href="../download.html">download</a> the Axis2 WAR distribution and place the axis2.war file in the server's webapps directory. The server will then expand the distribution into its proper structure, as seen in the <a href="userguide.html#hierarchy">earlier section</a>.</p> | |
| <p>Apache Axis2 services come bundled as *.aar files, which contain all the pieces necessary to define the service, such as the necessary classes and libraries and the services.xml file that defines the service's behavior. You can install the service using the <a href="webadminguide.html">Web administration application</a>, but to make things simple for now, copy the *.aar file into the Axis2 services directory. For example, to install the MyService service distributed as one of the Axis2 samples, copy the file <AXIS2_HOME>/modules/samples/userguide/build/MyService.aar file, which is built using the <code>ant</code> command, from <AXIS2_HOME>/modules/samples/userguide, to the directory the WEB-INF/services directory of the deployed axis2 web application (for example <TOMCAT_HOME>/webapps/axis2/WEB-INF/services).</p> | |
| <p>Your client can come in any number of forms, from a collection of files to a single *.jar file. The important thing is to ensure that all the appropriate classes are on the classpath. In addition to the classes that pertain to the actual client, you must also add the Axis2 .jar files into the CLASSPATH. Normally you will do this by downloading and unpacking the <a href="../download.html"> Axis2 Standard Distribution</a> and adding the *.jar files in the lib directory to your CLASSPATH, or you also have the option of running your client using the axis2.bat (or axis2.sh) script, which takes care of it for you. For example, you can run a client with the command:</p> | |
| <p>axis2 org.apache.axis2.axis2userguide.Client.</p> | |
| <p><strong>See Next Section</strong>- <a href="userguide-introtoservices.html#introservices">Introduction to Services</a></p> | |
| </section> | |
| </html> </main> | |
| </div> | |
| </div> | |
| <hr/> | |
| <footer> | |
| <div class="container-fluid"> | |
| <div class="row-fluid"> | |
| <p>© 2004–2026 | |
| <a href="https://www.apache.org/">The Apache Software Foundation</a> | |
| </p> | |
| </div> | |
| </div> | |
| </footer> | |
| </body> | |
| </html> |