blob: 32333943d997baaa5b1ad62e047ffe502ca0080e [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.9.2 at 2021-08-01
| Rendered using Apache Maven Fluido Skin 1.6
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20210801" />
<meta http-equiv="Content-Language" content="en" />
<title>Apache Axis2 &#x2013; Axis2 Configuration Documents</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.6.min.css" />
<link rel="stylesheet" href="../css/site.css" />
<link rel="stylesheet" href="../css/print.css" media="print" />
<script type="text/javascript" src="../js/apache-maven-fluido-1.6.min.js"></script>
<meta http-equiv="content-type" content="" /> </head>
<body class="topBarDisabled">
<div class="container-fluid">
<div id="banner">
<div class="pull-left"><a href="http://www.apache.org/" id="bannerLeft"><img src="http://www.apache.org/images/asf_logo_wide.png" alt="Apache Axis2"/></a></div>
<div class="pull-right"><a href=".././" id="bannerRight"><img src="../images/axis.jpg" /></a></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2021-08-01<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 1.8.0<span class="divider">|</span></li>
<li class=""><a href="http://www.apache.org" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
<li class=""><a href="../index.html" title="Axis2/Java">Axis2/Java</a><span class="divider">/</span></li>
<li class="active ">Axis2 Configuration Documents</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span2">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Axis2/Java</li>
<li><a href="../index.html" title="Home"><span class="none"></span>Home</a> </li>
<li><a href="../download.html" title="Downloads"><span class="none"></span>Downloads</a> </li>
<li><a href="javascript:void(0)" title="Release Notes"><span class="icon-chevron-down"></span>Release Notes</a>
<ul class="nav nav-list">
<li><a href="../release-notes/1.6.1.html" title="1.6.1"><span class="none"></span>1.6.1</a> </li>
<li><a href="../release-notes/1.6.2.html" title="1.6.2"><span class="none"></span>1.6.2</a> </li>
<li><a href="../release-notes/1.6.3.html" title="1.6.3"><span class="none"></span>1.6.3</a> </li>
<li><a href="../release-notes/1.6.4.html" title="1.6.4"><span class="none"></span>1.6.4</a> </li>
<li><a href="../release-notes/1.7.0.html" title="1.7.0"><span class="none"></span>1.7.0</a> </li>
<li><a href="../release-notes/1.8.0.html" title="1.8.0"><span class="none"></span>1.8.0</a> </li>
</ul>
</li>
<li><a href="../modules/index.html" title="Modules"><span class="none"></span>Modules</a> </li>
<li><a href="../tools/index.html" title="Tools"><span class="none"></span>Tools</a> </li>
<li class="nav-header">Documentation</li>
<li><a href="../docs/toc.html" title="Table of Contents"><span class="none"></span>Table of Contents</a> </li>
<li><a href="../docs/installationguide.html" title="Installation Guide"><span class="none"></span>Installation Guide</a> </li>
<li><a href="../docs/quickstartguide.html" title="QuickStart Guide"><span class="none"></span>QuickStart Guide</a> </li>
<li><a href="../docs/userguide.html" title="User Guide"><span class="none"></span>User Guide</a> </li>
<li><a href="../docs/jaxws-guide.html" title="JAXWS Guide"><span class="none"></span>JAXWS Guide</a> </li>
<li><a href="../docs/pojoguide.html" title="POJO Guide"><span class="none"></span>POJO Guide</a> </li>
<li><a href="../docs/spring.html" title="Spring Guide"><span class="none"></span>Spring Guide</a> </li>
<li><a href="../docs/webadminguide.html" title="Web Administrator's Guide"><span class="none"></span>Web Administrator's Guide</a> </li>
<li><a href="../docs/migration.html" title="Migration Guide (from Axis1)"><span class="none"></span>Migration Guide (from Axis1)</a> </li>
<li class="nav-header">Resources</li>
<li><a href="../faq.html" title="FAQ"><span class="none"></span>FAQ</a> </li>
<li><a href="../articles.html" title="Articles"><span class="none"></span>Articles</a> </li>
<li><a href="http://wiki.apache.org/ws/FrontPage/Axis2/" class="externalLink" title="Wiki"><span class="none"></span>Wiki</a> </li>
<li><a href="../refLib.html" title="Reference Library"><span class="none"></span>Reference Library</a> </li>
<li><a href="../apidocs/index.html" title="Online Java Docs"><span class="none"></span>Online Java Docs</a> </li>
<li class="nav-header">Get Involved</li>
<li><a href="../overview.html" title="Overview"><span class="none"></span>Overview</a> </li>
<li><a href="../git.html" title="Checkout the Source"><span class="none"></span>Checkout the Source</a> </li>
<li><a href="../mail-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a> </li>
<li><a href="../release-process.html" title="Release Process"><span class="none"></span>Release Process</a> </li>
<li><a href="../guidelines.html" title="Developer Guidelines"><span class="none"></span>Developer Guidelines</a> </li>
<li><a href="../siteHowTo.html" title="Build the Site"><span class="none"></span>Build the Site</a> </li>
<li class="nav-header">Project Information</li>
<li><a href="../team-list.html" title="Project Team"><span class="none"></span>Project Team</a> </li>
<li><a href="../issue-tracking.html" title="Issue Tracking"><span class="none"></span>Issue Tracking</a> </li>
<li><a href="http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/" class="externalLink" title="Source Code"><span class="none"></span>Source Code</a> </li>
<li><a href="../thanks.html" title="Acknowledgements"><span class="none"></span>Acknowledgements</a> </li>
<li class="nav-header">Apache</li>
<li><a href="http://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink" title="License"><span class="none"></span>License</a> </li>
<li><a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"><span class="none"></span>Sponsorship</a> </li>
<li><a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a> </li>
<li><a href="http://www.apache.org/security/" class="externalLink" title="Security"><span class="none"></span>Security</a> </li>
</ul>
<hr />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a>
</div>
</div>
</div>
<div id="bodyColumn" class="span10" >
<html>
<h1>Axis2 Configuration Guide</h1>
<p>In Axis2, there are three kinds of configuration files to configure the
system. The first one is to configure the whole system (global
configuration), the second one is to configure a service (service
configuration), and the third one is to configure a module (module
configuration). This document explains the above configurations in detail.</p>
<section>
<h2><a name="Content"></a>Content</h2>
<ul>
<li><a href="#Global_Configuration">Global Configuration
(axis2.xml)</a></li>
<li><a href="#Service_Configuration">Service Configuration
(services.xml)</a></li>
<li><a href="#Module_Configuration">Module Configuration
(module.xml)</a></li>
</ul>
<a name="Global_Configuration"></a>
<section>
<h2><a name="Global_Configuration_.28axis2.xml.29"></a>Global Configuration (axis2.xml)</h2>
<p>All the configurations that require starting Axis2 are obtained from
axis2.xml. The way to specify them is extremely simple and easy. The document
is all about the proper way of specifying the configurations in axis2.xml, which
is located at AXIS2_HOME/conf. There are six top level elements that
can be seen in the configuration file inside the root element,
&lt;axisconfig name=&quot;AxisJava2.0&quot;&gt; and can be listed as follows:</p>
<ul>
<li><a href="#Parameter">Parameter</a></li>
<li><a href="#Receiver">Transport Receiver</a></li>
<li><a href="#Sender">Transport Sender</a></li>
<li><a href="#Phase_Order">Phase Order</a></li>
<li><a href="#References">Module References</a></li>
<li><a href="#Listeners">Listeners (Observers)</a></li>
</ul>
<a name="Parameter"></a>
<section>
<h3><a name="Parameter"></a>Parameter</h3>
<p>In Axis2, a parameter is nothing but a name-value pair. Each and every top
level parameter available in the axis2.xml (direct sub elements of the root
element) will be transformed into properties in AxisConfiguration. Therefore,
the top level parameters in the configuration document can be accessed via
AxisConfiguration in the running system. The correct way of defining a
parameter is shown below:</p>
<div>
<pre>&lt;parameter name=&quot;name of the parameter&quot; &gt;parameter value &lt;/parameter&gt;</pre></div>
<a name="Receiver"></a>
</section><section>
<h3><a name="Transport_Receiver"></a>Transport Receiver</h3>
<p>Depending on the underlying transport on which Axis2 is going to run, you
need to have different transport receivers. The way you add them to the
system is as follows:</p>
<div>
<pre>&lt;transportReceiver name=&quot;http&quot; class=&quot;org.apache.axis2.transport.http.SimpleHTTPServer&quot;&gt;
&lt;parameter name=&quot;port&quot; &gt;6060&lt;/parameter&gt;
&lt;/transportReceiver&gt;</pre></div>
The above elements show how to define transport receivers in
axis2.xml. Here the &quot;name&quot; attribute of the &lt;transportReceiver/&gt; element identifies the
type of the transport receiver. It can be HTTP, TCP, SMTP, etc.
When the system starts up or when you set the transport at the client side,
you can use these transport names to load the appropriate transport. The &quot;class&quot;
attribute is for specifying the actual java class that will implement the required
interfaces for the transport. Any transport can have zero or more parameters,
and any parameters given can be accessed via the corresponding
transport receiver. <a name="Sender"></a>
</section><section>
<h3><a name="Transport_Sender"></a>Transport Sender</h3>
<p>Just like the transport receivers, you can register transport senders in the
system, and later at run time, the senders can be used to send the messages.
For example, consider Axis2 running under Apache Tomcat. Then Axis2 can use
TCP transport senders to send messages rather than HTTP. The method of
specifying transport senders is as follows:</p>
<div>
<pre>
&lt;transportSender name=&quot;http&quot; class=&quot;org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender&quot;&gt;
&lt;parameter name=&quot;PROTOCOL&quot; locked=&quot;xsd:false&quot;&gt;HTTP/1.0&lt;/parameter&gt;
&lt;/transportSender&gt;
</pre></div>
<b>name:</b> Name of the transport (you can have HTTP and HTTP1 as
the transport name)
<p><b>class:</b> Implementation class of the corresponding
transport.</p>
<p>Just like the transport receivers, transport senders can have zero
or more parameters, and if there are any, they can be accessed via the
corresponding transport sender.</p>
<a name="Phase_Order"></a>
</section><section>
<h3><a name="Phase_Order"></a>Phase Order</h3>
<p>Specifying the order of phases in the execution chain has to be done using
the phase order element. It will look as follows:</p>
<div>
<pre>&lt;phaseOrder type=&quot;InFlow&quot;&gt;
&lt;phase name=&quot;TransportIn&quot;/&gt;
.
.
&lt;/phaseOrder&gt; </pre></div>
<p>The most interesting thing is that you can add handlers here as well. If
you want to add a handler that should go into that phase, you can directly do
that by adding a handler element into it. In addition to that, there is no
hard coding work for the handler chain anywhere in Axis2 (at any Axis*). So
all those configurations are also done in the phase order element. The
complete configurations will look as follows: </p>
<div>
<pre>&lt;phaseOrder type=&quot;InFlow&quot;&gt;
&lt;!-- Global phases --&gt;
&lt;phase name=&quot;Transport&quot;&gt;
&lt;handler name=&quot;RequestURIBasedDispatcher&quot;
class=&quot;org.apache.axis2.dispatchers.RequestURIBasedDispatcher&quot;&gt;
&lt;order phase=&quot;Transport&quot;/&gt;
&lt;/handler&gt;
&lt;handler name=&quot;SOAPActionBasedDispatcher&quot;
class=&quot;org.apache.axis2.dispatchers.SOAPActionBasedDispatcher&quot;&gt;
&lt;order phase=&quot;Transport&quot;/&gt;
&lt;/handler&gt;
&lt;/phase&gt;
&lt;phase name=&quot;Security&quot;/&gt;
&lt;phase name=&quot;PreDispatch&quot;/&gt;
&lt;phase name=&quot;Dispatch&quot; class=&quot;org.apache.axis2.engine.DispatchPhase&quot;&gt;
&lt;handler name=&quot;AddressingBasedDispatcher&quot;
class=&quot;org.apache.axis2.dispatchers.AddressingBasedDispatcher&quot;&gt;
&lt;order phase=&quot;Dispatch&quot;/&gt;
&lt;/handler&gt;
&lt;handler name=&quot;SOAPMessageBodyBasedDispatcher&quot;
class=&quot;org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher&quot;&gt;
&lt;order phase=&quot;Dispatch&quot;/&gt;
&lt;/handler&gt;
&lt;handler name=&quot;InstanceDispatcher&quot;
class=&quot;org.apache.axis2.engine.InstanceDispatcher&quot;&gt;
&lt;order phase=&quot;Dispatch&quot;/&gt;
&lt;/handler&gt;
&lt;/phase&gt;
&lt;!-- Global phases --&gt;
&lt;!-- After the Dispatch phase module author or service author can add any phase he wants --&gt;
&lt;phase name=&quot;OperationInPhase&quot;/&gt;
&lt;/phaseOrder&gt;
&lt;phaseOrder type=&quot;OutFlow&quot;&gt;
&lt;!-- user can add his own phases to this area --&gt;
&lt;phase name=&quot;OperationOutPhase&quot;/&gt;
&lt;!-- Global phases --&gt;
&lt;!-- these phases will run irrespective of the service --&gt;
&lt;phase name=&quot;MessageOut&quot;/&gt;
&lt;phase name=&quot;PolicyDetermination&quot;/&gt;
&lt;/phaseOrder&gt;
&lt;phaseOrder type=&quot;InFaultFlow&quot;&gt;
&lt;phase name=&quot;PreDispatch&quot;/&gt;
&lt;phase name=&quot;Dispatch&quot; class=&quot;org.apache.axis2.engine.DispatchPhase&quot;&gt;
&lt;handler name=&quot;RequestURIBasedDispatcher&quot;
class=&quot;org.apache.axis2.dispatchers.RequestURIBasedDispatcher&quot;&gt;
&lt;order phase=&quot;Dispatch&quot;/&gt;
&lt;/handler&gt;
&lt;handler name=&quot;SOAPActionBasedDispatcher&quot;
class=&quot;org.apache.axis2.dispatchers.SOAPActionBasedDispatcher&quot;&gt;
&lt;order phase=&quot;Dispatch&quot;/&gt;
&lt;/handler&gt;
&lt;handler name=&quot;AddressingBasedDispatcher&quot;
class=&quot;org.apache.axis2.dispatchers.AddressingBasedDispatcher&quot;&gt;
&lt;order phase=&quot;Dispatch&quot;/&gt;
&lt;/handler&gt;
&lt;handler name=&quot;SOAPMessageBodyBasedDispatcher&quot;
class=&quot;org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher&quot;&gt;
&lt;order phase=&quot;Dispatch&quot;/&gt;
&lt;/handler&gt;
&lt;handler name=&quot;InstanceDispatcher&quot;
class=&quot;org.apache.axis2.engine.InstanceDispatcher&quot;&gt;
&lt;order phase=&quot;Dispatch&quot;/&gt;
&lt;/handler&gt;
&lt;/phase&gt;
&lt;!-- user can add his own phases to this area --&gt;
&lt;phase name=&quot;OperationInFaultPhase&quot;/&gt;
&lt;/phaseOrder&gt;
&lt;phaseOrder type=&quot;OutFaultFlow&quot;&gt;
&lt;!-- user can add his own phases to this area --&gt;
&lt;phase name=&quot;OperationOutFaultPhase&quot;/&gt;
&lt;phase name=&quot;PolicyDetermination&quot;/&gt;
&lt;phase name=&quot;MessageOut&quot;/&gt;
&lt;/phaseOrder&gt;</pre></div>
<p><b>type:</b> the attribute represents the type of the flow. It
can only be one of the following:</p>
<ul>
<li>InFlow</li>
<li>OutFlow</li>
<li>InFaultFlow</li>
<li>OutFaultFlow</li>
</ul>
<p>In addition to that, the only child element that is allowed inside
&quot;phaseOrder&quot; is the &quot;phase&quot; element which represents the available phases in
the execution chain. The method of specifying phases inside &quot;phaseOrder&quot; is
as follows:</p>
<div>
<pre>&lt;phase name=&quot;Transport&quot;/&gt;</pre></div>
<p><b>name:</b> Name of the phase. <br />
</p>
<p>There are a number of things that one has to keep in mind when changing a
phaseOrder:</p>
<p>For the phaseOrder types <b>&quot;InFlow&quot;</b> and
<b>&quot;InFaultFlow&quot;</b></p>
<ul>
<li>All the phases that are above the &quot;Dispatch&quot; phase, including the
&quot;Dispatch&quot; phase, are known as &quot;Global phases&quot; . You can add any number
of new phases here and they will be considered global.</li>
<li>In these two phaseOrder types, the phases added after the &quot;Dispatch&quot;
phase are known as &quot;Operation phases&quot;.</li>
</ul>
<p>For the phaseOrder types <b>&quot;OutFlow&quot;</b> and
<b>&quot;OutFaultFlow&quot;</b></p>
<ul>
<li>All the phases that are below the &quot;MessageOut&quot; phase, including the
&quot;MessageOut&quot; phase, are known as &quot;Global phases&quot;. You can add new phases
according to your requirement.</li>
<li>The phases added before the &quot;MessageOut&quot; phase are known as &quot;Operation
phases&quot;.</li>
<p><b>Note :</b> If you look closely at the default axis2.xml,
you will be able to clearly identify it.</p>
</ul>
<a name="References"></a>
</section><section>
<h3><a name="Module_References"></a>Module References</h3>
<p>If you want to engage a module, system wide, you can do it by adding a top
level module element in axis2.xml. It should look as follows:</p>
<div>
<pre>&lt;module ref=&quot;addressing&quot;/&gt;</pre></div>
<p><b>ref:</b> the module name which is going to be engaged, system
wide.</p>
<a name="Listeners"></a>
</section><section>
<h3><a name="Listeners_.28Observers.29"></a><b>Listeners (Observers)</b></h3>
<p>In Axis2, AxisConfiguration is observable so that you can register
observers into that. They will be automatically informed whenever a change
occurs in AxisConfiguration. In the current implementation, the observers are
informed of the following events:</p>
<ul>
<li>Deploying a Service</li>
<li>Removing a service</li>
<li>Activate/Inactivate Service</li>
<li>Module deploy</li>
<li>Module remove</li>
</ul>
<p>Registering Observers is very useful for additional features such as RSS
feed generation, which will provide service information to subscribers. The
correct way of registering observers should as follows:</p>
<div>
<pre>&lt;listener class=&quot;org.apache.axis2.ObserverIMPL&quot;&gt;
&lt;parameter name=&quot;RSS_URL&quot; &gt;http://127.0.0.1/rss&lt;/parameter&gt;
&lt;/listener&gt;</pre></div>
<p><b>class:</b> Represents an Implementation class of observer,
and it should be noted that the Implementation class should implement
AxisObserver interface, and the class has to be available in the classpath.
<a name="Service_Configuration"></a></p>
</section><section>
<h2><a name="Service_Configuration_.28services.xml.29"></a><font>Service Configuration (services.xml)</font></h2>
<p><font>The description of services are specified using services.xml. Each
service archive file needs to have a services.xml in order to be a valid
service and it should be available in the META-INF directory of the archive
file(aar) which should be located in AXIS2_HOME/repository/services in
standalone use. In war distribution this will be axis2/WEB-INF/services
inside the servlet container. A very simple services.xml is shown below:</font></p>
<div>
<pre>
&lt;service name=&quot;name of the service&quot; scope=&quot;name of the scope&quot;
class=&quot;fully qualified name the service lifecycle class&quot;
targetNamespace=&quot;target namespace for the service&quot;&gt;
&lt;description&gt; The description of the service &lt;/description&gt;
&lt;transports&gt;
&lt;transport&gt;HTTP&lt;/transport&gt;
&lt;/transports&gt;
&lt;schema schemaNamespace=&quot;schema namespace&quot;/&gt;
&lt;messageReceivers&gt;
&lt;messageReceiver mep=&quot;http://www.w3.org/ns/wsdl/in-out&quot;
class=&quot;org.apache.axis2.rpc.receivers.RPCMessageReceiver&quot;/&gt;
&lt;/messageReceivers&gt;
&lt;parameter name=&quot;ServiceClass&quot; locked=&quot;xsd:false&quot;&gt;org.apache.axis2.sample.echo.EchoImpl&lt;/parameter&gt;
&lt;operation name=&quot;echoString&quot; mep=&quot;operation MEP&quot;&gt;
&lt;actionMapping&gt;Mapping to action&lt;/actionMapping&gt;
&lt;module ref=&quot; a module name &quot;/&gt;
&lt;messageReceiver class=&quot;org.apache.axis2.receivers.RawXMLINOutMessageReceiver&quot;/&gt;
&lt;/operation&gt;
&lt;/service&gt;
</pre></div>
<p><b>name</b>: The service name will be the name of the archive
file if the .aar file contains only one service, or else the name of the
service will be the name given by the name attribute.</p>
<p><b>scope</b>: (Optional Attribute) The time period during which
runtime information of the deployed services will be available. Scope is of
several types- &quot;application&quot;, &quot;soapsession&quot;, &quot;transportsession&quot;, &quot;request&quot;.
The default value (if you don't enter any value) will be &quot;request&quot;</p>
<p><b>class</b>: (Optional attribute) The full qualified name of
the service lifecycle implementation class. ServiceLifeCycle class is useful
when you want to do some tasks when the system starts and when it
shuts down.</p>
<p><b>targetNamespace</b>: (Optional Attribute) Target name space
of the service. This value will be used when generating the WSDL. If you do
not specify this value, the value will be calculated from the package name of
the service impl class.</p>
<p><font><b>Description</b>: (Optional) If you want to display any
description about the service via Axis2 web-admin module, then the
description can be specified here.</font></p>
<p><b>transports</b> : (Optional) The transports to which the
service is going to be exposed. If the transport element is not present, then
the service will be exposed in all the transports available in the system.
The transport child element specifies the transport prefix (the name of the
transport specified in axis2.xml).</p>
<p><b>parameters:</b> A services.xml can have any number of top level
parameters and all the specified parameters will be transformed into service
properties in the corresponding AxisService. There is a compulsory parameter
in services.xml called ServiceClass that specifies the Java class, which
performs the above transformation. This class is loaded by the
MessageReceiver.</p>
<p><b>operations :</b> If the service impl class is Java, then all the public
methods in that service will be exposed. If the user wants to override it, he
has to add the &quot;operation&quot; tag and override it. In a non-Java scenario or if
you do not have a service class, then all the operations the user wants to
expose by the service has to be indicated in the services.xml. It is
specified as follows:</p>
<div>
<pre>
&lt;operation name=&quot;echoString&quot;&gt;
&lt;module ref=&quot; a module name &quot;/&gt;
&lt;messageReceiver class=&quot;org.apache.axis2.receivers.RawXMLINOutMessageReceiver&quot;/&gt;
&lt;/operation&gt;
</pre></div>
<p>The only compulsory attribute here is &quot;name&quot;, which represents the
operation name that is going to be exposed. Any operation can contain module
references as well as any number of parameters. The most interesting thing is
that you can register custom message receivers per operation. Then the
registered message receiver will be the message receiver for the
corresponding operation. If you do not specify the message receiver, then the
default message receiver will perform the operation. <br />
<a name="Module_Configuration"></a></p>
<section>
<h2><a name="Module_Configuration_.28module.xml.29"></a>Module Configuration (module.xml)</h2>
<p>The description of the module is specified using the module.xml. Each
module archive file needs to have a module.xml in order to be a valid module,
and it should be available in the META-INF directory of the archive file(mar)
which should be located in AXIS2_HOME/repository/modules in standalone use.
In war distribution this will be axis2/WEB-INF/modules inside the servlet container.<br />
</p>
<p>A very simple module.xml is shown below:</p>
<div>
<pre>
&lt;module class=&quot;org.apache.module.Module1Impl&quot;&gt;
&lt;InFlow&gt;
.
.
&lt;/InFlow&gt;
&lt;OutFlow&gt;
.
.
&lt;/OutFlow&gt;
&lt;OutFaultFlow&gt;
.
.
&lt;/OutFaultFlow&gt;
&lt;InFaultFlow&gt;
.
.
&lt;/InFaultFlow&gt;
&lt;operation name=&quot;creatSeq&quot; mep=&quot;MEP_URI_IN_OUT&quot;&gt;
&lt;messageReceiver class=&quot;org.apache.axis2.receivers.RawXMLINOutMessageReceiver&quot;/&gt;
&lt;parameter name=&quot;para1&quot; locked=&quot;xsd:true&quot;&gt;10&lt;/parameter&gt;
&lt;/operation&gt;
&lt;/module&gt;
</pre></div>
<p><b>class:</b> (Optional attribute) Indicates the module
implementation class. A module may or may not contain a module implementation
class since the module can also be a collection of handlers. If a module
contains an implementation class that implements the
org.apache.axis2.modules.Module interface at deployment, its
<code>init();</code> method will be called.</p>
<p><b>parameter:</b> A module can contain any number of parameters and all
the listed parameters in the module.xml will be transformed into the
corresponding AxisModule of the module.</p>
<p><b>flow: </b>Defining of handlers in a module has to be done inside flows.
There are four types of flows as listed below.</p>
<p>You can add any number of handlers into a flow, and those handlers will be
available in the corresponding chains at runtime, when they are engaged.</p>
<ul>
<li>InFlow</li>
<li>OutFlow</li>
<li>InFaultFlow</li>
<li>OutFaultFlow</li>
</ul>
<p><b>operations: </b> If a module wants to add an operation when it is
engaged into a service, it can be done by adding an operation tag in
module.xml. The method of specifying the operation is the same as operation
in services.xml.</p>
<p><b>handler:</b> The Handler element consists of compulsory and optional
attributes. The method of defining a handler will look as follows:</p>
<div>
<pre>&lt;handler name=&quot;handler1&quot; class=&quot;handlerClass &quot;&gt;
&lt;order phase=&quot;userphase1&quot; /&gt;
&lt;/handler&gt;</pre></div>
<p><b><i>Compulsory Attributes</i></b> <br />
<b>name:</b> Name of the handler.<br />
<b>class:</b> Handler implementation class.<br />
<b>phase:</b> Name of the phase that the handler should remain, in the
execution chain. <br />
<br />
<i><b>Optional Attributes :</b></i><br />
<b>phaseLast:</b> Indicates that the handler is the last handler of the
phase.<br />
<b>phaseFirst:</b> Indicate that the handler is the first handler of the
phase.<br />
<b>before :</b> Indicates that the current handler should be invoked before
the handler specified by the before handler<br />
<b>after:</b> Indicates that the current handler should be invoked after the
handler specified by the after handler<br />
</p>
<p><br />
</p>
</html>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p>Copyright &copy;2004&#x2013;2021
<a href="https://www.apache.org/">The Apache Software Foundation</a>.
All rights reserved.</p>
</div>
</div>
</footer>
</body>
</html>