blob: 7ba328fff5bf6b51990ee4942d23836e0b47780b [file]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 2.0.0 from src/site/xdoc/docs/userguide-samples.xml at 2026-05-18
| 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.0.0" />
<title>Apache Axis2 User&apos;s Guide- The Samples – 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-05-17<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.0.1<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&apos;s Guide- The Samples</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.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>
</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&apos;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="../mail-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="samples"></a>
<section><a id="Apache_Axis2_User.27s_Guide_-_The_Samples"></a>
<h1>Apache Axis2 User's Guide - The Samples</h1>
<p>The Apache Axis2 Standard Distribution provides a number of
samples you can use as a guide for implementing specific features
and capabilities. These services are listed in this section.</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#handlesjson">How Axis2 handles JSON
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#docs">Axis2 Documents
Distribution</a></li>
<li><a href="userguide.html#clients">Axis2 and clients</a></li>
</ul>
</li>
<li><a href="userguide-installingtesting.html#installingtesting">Installing and
testing client code</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"><strong>Samples</strong></a>
<ul>
<li><a href="userguide-samples.html#clients"><strong>Clients</strong></a></li>
<li><a href="userguide-samples.html#services"><strong>Services</strong></a></li>
<li><a href="userguide-samples.html#wsdl"><strong>Sample WSDL
files</strong></a></li>
<li><a href="userguide-samples.html#json"><strong>Sample using Rest with JSON
and Spring Boot with Spring Security</strong></a></li>
<li><a href="userguide-samples.html#others"><strong>Other
Samples</strong></a></li>
</ul>
</li>
<li><a href="userguide-forfurtherstudy.html">For Further
Study</a></li>
</ul>
<a id="clients"></a>
</section><section><a id="Clients_.28in_AXIS2_HOME.2Fsamples.2Fuserguide.2Fsrc.2Fclients.29.3A"></a>
<h2>Clients (in AXIS2_HOME/samples/userguide/src/clients):</h2>
<p><strong>EchoBlockingClient.java</strong>: A basic example of the
send/receive MEP.</p>
<p><strong>EchoBlockingDualClient.java</strong>: Specifies that the
return message should be sent over a different channel than the
request message.</p>
<p><strong>EchoBlockingWsaBasedClient.java</strong>: Provides an
example of using the capabilities of WS-Addressing action
mapping.</p>
<p><strong>EchoNonBlockingClient.java</strong>: Demonstrates an
asynchronous request using Callbacks.</p>
<p><strong>EchoNonBlockingDualClient.java</strong>: Similar to the
above, but uses a separate listener for the response.</p>
<p><strong>ClientForWebServiceWithModule.java</strong>: Simply
makes a call to a service with engaged modules.</p>
<p><strong>ClientSideModuleEngagement.java</strong>: Demonstrates
the use of modules on the client side, in addition to the server
side.</p>
<p><strong>MailClient.java</strong>: Demonstrates the use of the
Robust In-Only MEP.</p>
<p><strong>PingClient.java</strong>: A simple &quot;fire and forget&quot;
client.</p>
<p><strong>RESTClient.java</strong>: Demonstrates the ability to
request a REST response rather than a SOAP response. Also
demonstrates setting arbitrary properties on the Options
object.</p>
<p><strong>TCPClient.java</strong>: Provides an example of using
the TCP transport rather than HTTP.</p>
<a id="services"></a>
</section><section><a id="Services_.28in_AXIS2_HOME.2Fsamples.2Fuserguide.29.3A"></a>
<h2>Services (in AXIS2_HOME/samples/userguide):</h2>
<p><strong>groovyService.aar</strong>: Demonstrates how to use
Groovy classes in the processing of SOAP messages.</p>
<p><strong>MyService.aar</strong>: Provides simple &quot;echo&quot; and
&quot;ping&quot; operations.</p>
<p><strong>MyServiceWithModule.aar</strong>: Same as above, but
demonstrates how to engage a module.</p>
<p><strong>WsaMappingService.aar</strong>: Demonstrates the mapping
of WS-Addressing actions.</p>
<a id="wsdl"></a>
</section><section><a id="Sample_WSDL_files_.28in_AXIS2_HOME.2Fsamples.29.3A"></a>
<h2>Sample WSDL files (in AXIS2_HOME/samples):</h2>
<p><strong>Axis2SampleDocLit.wsdl</strong>: Demonstrates the use of
the Document/Literal WSDL pattern, rather than RPC.</p>
<p><strong>perf.wsdl</strong>: Demonstrates the use of array values
as input values.</p>
<a id="json"></a>
</section><section><a id="Sample_webapp_that_uses_JSON.2C_Spring_Boot.2C_Spring_Security.2C_and_Moshi"></a>
<h2>Sample webapp that uses JSON, Spring Boot, Spring Security, and Moshi</h2>
<p>A complete Axis2 webapp via Maven that demonstrates JSON and Moshi securely with
Spring Boot is located in the <b>&quot;modules/samples/userguide/src/springbootdemo&quot;</b> directory of <a href="../download.cgi">Axis2 standard binary
distribution</a>.</p>
<a id="others"></a>
</section><section><a id="Other_samples"></a>
<h2>Other samples</h2>
<section><a id="In_AXIS2_HOME.2Fsamples_Directory.3A"></a>
<h3>In AXIS2_HOME/samples Directory:</h3>
<p><strong>faulthandling</strong>: Demonstrates the use of SOAP
faults and their definitions in WSDL enabling exception processing
in the client.</p>
<p><strong>googleSpellcheck</strong>: Demonstrates both synchronous
and non-synchronous use of the Google Web Service in a GUI.</p>
<p><strong>mtom</strong>: Demonstrates the use of MTOM and SOAP
with Attachments to send binary files to a service.</p>
<p><strong>saopwithattachments</strong>: Demonstrates the
capabilities and power of SOAP with Attachment support and the
Attachment API of Axis2.</p>
<p><strong>pojo</strong>: Example of a POJO (Plain Old Java Object)
Web service. It shows how to expose the methods of a Java class as
a Web service using Apache Aixs2.</p>
<p><strong>servicelifecycle</strong>: Demonstrates the usage of a
service life cycle and a bit of session management. The main idea
is to show where and how to use the service life cycle interface
and session related methods.</p>
<p><strong>version</strong>: A very simple service that simply
outputs the Apache Axis2 version.</p>
<p><strong>yahoorestearch</strong>: A complete example of the use
of a REST service rather than a SOAP service.</p>
<p><strong>See Next Section</strong> - <a href="userguide-forfurtherstudy.html">For Further Study</a></p>
</section></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>