Apache Axis2 User's Guide - The Samples

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.


Clients (in AXIS2_HOME/samples/userguide/src/clients):

EchoBlockingClient.java: A basic example of the send/receive MEP.

EchoBlockingDualClient.java: Specifies that the return message should be sent over a different channel than the request message.

EchoBlockingWsaBasedClient.java: Provides an example of using the capabilities of WS-Addressing action mapping.

EchoNonBlockingClient.java: Demonstrates an asynchronous request using Callbacks.

EchoNonBlockingDualClient.java: Similar to the above, but uses a separate listener for the response.

ClientForWebServiceWithModule.java: Simply makes a call to a service with engaged modules.

ClientSideModuleEngagement.java: Demonstrates the use of modules on the client side, in addition to the server side.

MailClient.java: Demonstrates the use of the Robust In-Only MEP.

PingClient.java: A simple "fire and forget" client.

RESTClient.java: Demonstrates the ability to request a REST response rather than a SOAP response. Also demonstrates setting arbitrary properties on the Options object.

TCPClient.java: Provides an example of using the TCP transport rather than HTTP.

Services (in AXIS2_HOME/samples/userguide):

groovyService.aar: Demonstrates how to use Groovy classes in the processing of SOAP messages.

MyService.aar: Provides simple "echo" and "ping" operations.

MyServiceWithModule.aar: Same as above, but demonstrates how to engage a module.

WsaMappingService.aar: Demonstrates the mapping of WS-Addressing actions.

Sample WSDL files (in AXIS2_HOME/samples):

Axis2SampleDocLit.wsdl: Demonstrates the use of the Document/Literal WSDL pattern, rather than RPC.

perf.wsdl: Demonstrates the use of array values as input values.

Sample webapp that uses JSON, Spring Boot, Spring Security, and Moshi

A complete Axis2 webapp via Maven that demonstrates JSON and Moshi securely with Spring Boot is located in the "samples/userguide/src/springbootdemo" directory of Axis2 standard binary distribution.

Other samples

In AXIS2_HOME/samples Directory:

faulthandling: Demonstrates the use of SOAP faults and their definitions in WSDL enabling exception processing in the client.

googleSpellcheck: Demonstrates both synchronous and non-synchronous use of the Google Web Service in a GUI.

mtom: Demonstrates the use of MTOM and SOAP with Attachments to send binary files to a service.

saopwithattachments: Demonstrates the capabilities and power of SOAP with Attachment support and the Attachment API of Axis2.

pojo: 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.

servicelifecycle: 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.

databinding: Demonstrates how to use WSDL2Java generated code with Castor.

version: A very simple service that simply outputs the Apache Axis2 version.

yahoorestearch: A complete example of the use of a REST service rather than a SOAP service.


FlickrClient : 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.

Extract the WSO2 WSAS for Java nightly build distribution 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

See Next Section - For Further Study