This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Configuring axis2.xml
Users can change the default functionality-related configurations by editing the <PRODUCT_HOME>/repository/conf/axis2/axis2.xml file using the information given below. This information is provided as reference for users who are already familiar with the product features and want to know how to configure them. If you need introductory information on a specific concept, such as message receivers and formatters, see the relevant topics in the User Guide.
Click on the table and use the left and right arrow keys to scroll horizontally. For sample values, see the Example below the table.
XML element | Attributes | Description | Data type | Default value | Mandatory/Optional |
|---|---|---|---|---|---|
|
| The root element. The name is defined as: |
|
| Mandatory |
|
| A globally engaged module. The |
|
| Mandatory |
|
| A parameter is a name-value pair. All top-level parameters (those that are direct sub-elements of the root element) will be transformed into properties in AxisConfiguration and can be accessed in the running system. The |
|
| Mandatory |
|
| A registered listener that will be automatically informed whenever a change occurs in AxisConfiguration, such as when a service or module is deployed or removed. The |
|
| Optional |
|
| The container element for messages receiver definitions. |
|
| Mandatory |
|
| A message receiver definition. The |
|
| Mandatory |
|
| The container element for message formatter definitions, which are used to serialize outgoing messages to different formats (such as JSON). The format for a message can be specified by setting the "messageType" property in the MessageContext. It can also be specified as a parameter in service.xml (for service-based configuration) in addition to axis2.xml (for global configuration). |
|
| Optional |
|
| A message formatter definition. The |
|
| Optional |
|
| The container element for the message builder definitions, which are used to process the raw payload of incoming messages and convert them to SOAP. |
|
| Optional |
|
| A message builder definition. The |
|
| Optional |
|
| A transport receiver definition, one for each transport type. The |
|
| Mandatory |
|
| Just like |
|
| Mandatory |
|
| Specifies the order of phases in the execution chain of a specific type of flow (specified by the
You add phases using the |
|
| Mandatory |
|
| The phase definition. The |
|
| Mandatory |
|
| The handler (message processing functionality) to execute during this phase. Handlers are combined into chains and phases to provide customizable functionality such as security, reliability, etc. Handlers must be multi-thread safe and should keep all their state in Context objects (see the org.apache.axis2.context package). |
|
| Optional |
| phase |
|
|
| Optional |
|
| Used to enable clustering. The |
|
| Optional |
|
|
|
|
| Optional |
| name |
|
|
|
|
| value |
|
|
|
|
_ _<members> |
| The list of static or well-known members. These entries will only be valid if the "membershipScheme" above is set to "wka" |
| N/A | Optional |
_ _ _<member> |
|
|
| N/A | Optional |
_ _ _ _<hostName> |
|
|
| N/A | Optional |
_ _ _ _<port> |
|
|
| N/A | Optional |
_ _<groupManagement> |
| Enable the groupManagement entry if you need to run this node as a cluster manager. Multiple application domains with different GroupManagementAgent implementations can be defined in this section. |
|
| Optional |
| enable |
|
| FALSE |
|
_ _ _<applicationDomain> |
|
|
| N/A | Optional |
| name |
|
|
|
|
| port |
|
|
|
|
| subDomain |
|
|
|
|
| agent |
|
|
|
|
| description |
|
|
|
|
The following example shows excerpts from an axis2.xml file.
<?xml version="1.0" encoding="ISO-8859-1"?>
...
<axisconfig name="AxisJava2.0">
<!-- ================================================= -->
<!-- Parameters -->
<!-- ================================================= -->
...
<!-- If you want to enable file caching for attachments change this to true -->
<parameter name="cacheAttachments" locked="false">false</parameter>
<!-- Attachment file caching location relative to CARBON_HOME -->
<parameter name="attachmentDIR" locked="false">work/mtom</parameter>
<!-- Attachment file cache threshold size -->
<parameter name="sizeThreshold" locked="false">4000</parameter>
...
<!-- ================================================= -->
<!-- Listeners -->
<!-- ================================================= -->
<!-- This deployment interceptor will be called whenever before a module is initialized or -->
<!-- service is deployed -->
<listener class="org.wso2.carbon.core.deployment.DeploymentInterceptor"/>
<!-- ================================================= -->
<!-- Deployers -->
<!-- ================================================= -->
<!-- Deployer for the dataservice. -->
<!--<deployer extension="dbs" directory="dataservices" class="org.wso2.dataservices.DBDeployer"/>-->
<!-- Axis1 deployer for Axis2 -->
<!--<deployer extension="wsdd" class="org.wso2.carbon.axis1services.Axis1Deployer" directory="axis1services"/>-->
...
<!-- ================================================= -->
<!-- Message Receivers -->
<!-- ================================================= -->
<!-- This is the set of default Message Receivers for the system, if you want to have -->
<!-- message receivers for any of the other Message exchange Patterns (MEP) implement it -->
<!-- and add the implementation class to here, so that you can refer from any operation -->
<!-- Note : You can override this for particular service by adding this same element to the -->
<!-- services.xml with your preferences -->
<messageReceivers>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-only"
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/ns/wsdl/robust-in-only"
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<!-- ================================================= -->
<!-- Message Formatters -->
<!-- ================================================= -->
<!-- Following content type to message formatter mapping can be used to implement support -->
<!-- for different message format serializations in Axis2. These message formats are -->
<!-- expected to be resolved based on the content type. -->
<messageFormatters>
<messageFormatter contentType="application/x-www-form-urlencoded"
class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
<messageFormatter contentType="multipart/form-data"
class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
<messageFormatter contentType="application/xml"
class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
<messageFormatter contentType="text/xml"
class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
<messageFormatter contentType="application/soap+xml"
class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
<messageFormatter contentType="text/plain"
class="org.apache.axis2.format.PlainTextFormatter"/>
...
</messageFormatters>
<!-- ================================================= -->
<!-- Message Builders -->
<!-- ================================================= -->
<!-- Following content type to builder mapping can be used to implement support for -->
<!-- different message formats in Axis2. These message formats are expected to be -->
<!-- resolved based on the content type. -->
<messageBuilders>
<messageBuilder contentType="application/xml"
class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
<messageBuilder contentType="application/x-www-form-urlencoded"
class="org.apache.synapse.commons.builders.XFormURLEncodedBuilder"/>
<messageBuilder contentType="multipart/form-data"
class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
<messageBuilder contentType="text/plain"
class="org.apache.axis2.format.PlainTextBuilder"/>
...
</messageBuilders>
<!-- ================================================= -->
<!-- Transport Ins (Listeners) -->
<!-- ================================================= -->
<transportReceiver name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpListener">
<parameter name="port" locked="false">8280</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<!--parameter name="bind-address" locked="false">hostname or IP address</parameter-->
<!--parameter name="WSDLEPRPrefix" locked="false">https://apachehost:port/somepath</parameter-->
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.PassThroughNHttpGetProcessor</parameter>
<!--<parameter name="priorityConfigFile" locked="false">location of priority configuration file</parameter>-->
</transportReceiver>
...
<!-- ================================================= -->
<!-- Transport Outs (Senders) -->
<!-- ================================================= -->
<transportSender name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpSender">
<parameter name="non-blocking" locked="false">true</parameter>
<!--<parameter name="warnOnHTTP500" locked="false">*</parameter>-->
<!--parameter name="http.proxyHost" locked="false">localhost</parameter-->
<!--<parameter name="http.proxyPort" locked="false">3128</parameter>-->
<!--<parameter name="http.nonProxyHosts" locked="false">localhost|moon|sun</parameter>-->
</transportSender>
...
<!-- ================================================= -->
<!-- Global Engaged Modules -->
<!-- ================================================= -->
<!-- Comment this out to disable Addressing -->
<module ref="addressing"/>
<!-- ================================================= -->
<!-- Clustering -->
<!-- ================================================= -->
<!--
To enable clustering for this node, set the value of "enable" attribute of the "clustering"
element to "true". The initialization of a node in the cluster is handled by the class
corresponding to the "class" attribute of the "clustering" element. It is also responsible for
getting this node to join the cluster.
-->
<clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent"
enable="false">
<!--
This parameter indicates whether the cluster has to be automatically initalized
when the AxisConfiguration is built. If set to "true" the initialization will not be
done at that stage, and some other party will have to explictly initialize the cluster.
-->
<parameter name="AvoidInitiation">true</parameter>
...
<!--
The list of static or well-known members. These entries will only be valid if the
"membershipScheme" above is set to "wka"
-->
<members>
<member>
<hostName>127.0.0.1</hostName>
<port>4000</port>
</member>
</members>
<!--
Enable the groupManagement entry if you need to run this node as a cluster manager.
Multiple application domains with different GroupManagementAgent implementations
can be defined in this section.
-->
<groupManagement enable="false">
<applicationDomain name="wso2.esb.domain"
description="ESB group"
agent="org.wso2.carbon.core.clustering.hazelcast.HazelcastGroupManagementAgent"
subDomain="worker"
port="2222"/>
</groupManagement>
</clustering>
<!-- ================================================= -->
<!-- Transactions -->
<!-- ================================================= -->
<!--
Uncomment and configure the following section to enable transactions support
-->
<!--<transaction timeout="30000">
<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
<parameter name="UserTransactionJNDIName">UserTransaction</parameter>
<parameter name="TransactionManagerJNDIName">TransactionManager</parameter>
</transaction>-->
<!-- ================================================= -->
<!-- Phases -->
<!-- ================================================= -->
<phaseOrder type="InFlow">
<!-- System pre defined phases -->
<!--
The MsgInObservation phase is used to observe messages as soon as they are
received. In this phase, we could do some things such as SOAP message tracing & keeping
track of the time at which a particular message was received
NOTE: This should be the very first phase in this flow
-->
<phase name="MsgInObservation">
<handler name="TraceMessageBuilderDispatchHandler"
class="org.apache.synapse.transport.passthru.util.TraceMessageBuilderDispatchHandler"/>
</phase>
<phase name="Validation"/>
<phase name="Transport">
<handler name="RequestURIBasedDispatcher"
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
<order phase="Transport"/>
</handler>
<handler name="CarbonContextConfigurator"
class="org.wso2.carbon.mediation.initializer.handler.CarbonContextConfigurator"/>
<handler name="RelaySecuirtyMessageBuilderDispatchandler"
class="org.apache.synapse.transport.passthru.util.RelaySecuirtyMessageBuilderDispatchandler"/>
<handler name="SOAPActionBasedDispatcher"
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
<order phase="Transport"/>
</handler>
<!--handler name="SMTPFaultHandler"
class="org.wso2.carbon.core.transports.smtp.SMTPFaultHandler">
<order phase="Transport"/>
</handler-->
<handler name="CacheMessageBuilderDispatchandler"
class="org.wso2.carbon.mediation.initializer.handler.CacheMessageBuilderDispatchandler"/>
</phase>
...
</phaseOrder>
<phaseOrder type="OutFlow">
<!-- Handlers related to unified-endpoint component are added to the UEPPhase -->
<phase name="UEPPhase" />
<!-- user can add his own phases to this area -->
<phase name="RMPhase"/>
...
</phaseOrder>
...
</axisconfig>