<!--
  ~ 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.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Windows (vers 14 June 2007), see www.w3.org" />
<meta http-equiv="content-type" content="" />
<title>Apache Axis2 User's Guide- The Samples</title>
</head>
<body lang="en" xml:lang="en">
<a name="samples" id="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>
<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 name="clients" id="clients"></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 "fire and forget"
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 name="services" id="services"></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 "echo" and
"ping" 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 name="wsdl" id="wsdl"></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 name="json" id="json"></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>"samples/userguide/src/springbootdemo"</b> directory of <a
href="../download.cgi">Axis2 standard binary
distribution</a>.</p>
<a name="others" id="others"></a>
<h2>Other samples</h2>
<h3>In AXIS2_HOME/samples Directory:</h3>
<!--<p><strong>amazonqs</strong>: Uses the Amazon Queue Service to store and
retrieve String objects.</p>-->
<p><strong>faulthandling</strong>: Demonstrates the use of SOAP
faults and their definitions in WSDL enabling exception processing
in the client.</p>
<!--<p><strong>googlesearch</strong>: Creates a GUI-based application making use
of Google Web Services asynchronously.</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>sgccalculator</strong>: A simple calculator that demonstrates the
use of Service Groups.</p>-->
<p><strong>databinding</strong>: Demonstrates how to use WSDL2Java
generated code with Castor.</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>
<h3>External:</h3>
<p><strong>FlickrClient</strong> : Demonstrates code generation
capabilities for WSDL 2.0. The FlickrService.wsdl describes
services offered by flickr in terms of WSDL 2.0. It also
demonstrates how a restful service can be described using the
HTTPBinding of wsdl 2.0.</p>
<p>Extract the <a href=
"http://dist.wso2.org/products/wsas/java/nightly-build/">WSO2 WSAS
for Java nightly build distribution</a> and you will find the
sample at WSAS_HOME/samples/FlickrClient or checkout sample from
SVN:
http://wso2.org/repos/wso2/trunk/wsas/java/modules/samples/FlickrClient</p>
<p><strong>See Next Section</strong> - <a href=
"userguide-forfurtherstudy.html">For Further Study</a></p>
</body>
</html>
