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 Elements
XML element | Attributes | Description | Default value | Mandatory/Optional |
---|---|---|---|---|
<axisconfig> | name | The root element. The name is defined as: name="AxisJava2.0" | Mandatory | |
<module> | ref | A globally engaged module. The ref attribute specifies the module name. | Mandatory | |
<parameter> |
| 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 name attribute (required) specifies the parameter name. If you set the locked attribute to true (default is false), this parameter's value cannot be overridden by services and other configurations. | Mandatory | |
<listener> | class | 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 class attribute specifies this listener's implementation class, which must implement the AxisObserver interface.Registering listeners is useful for additional features such as RSS feed generation, which will provide service information to subscribers. | Optional | |
<messageReceivers> | The container element for messages receiver definitions. | Mandatory | ||
<messageReceiver> |
| A message receiver definition. The class attribute (required) specifies the message receiver implementation class. The mep attribute (required) specifies the message exchange pattern supported by this message receiver. Each message receiver definition supports only one MEP. | Mandatory | |
<messageFormatters> | 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 | ||
<messageFormatter> |
| A message formatter definition. The contentType attribute specifies which message types are handled by this formatter, and the class attribute specifies the formatter implementation class. | Optional | |
<messageBuilders> | 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 | ||
<messageBuilder> |
| A message builder definition. The contentType attribute specifies which message types are handled by this builder, and the class attribute specifies the builder implementation class. | Optional | |
<transportReceiver> |
| A transport receiver definition, one for each transport type. The name attribute specifies the short name to use when referring to this transport in your configurations (http, tcp, etc.), and the class attribute specifies the receiver implementation class that provides the logic for receiving messages via this transport. You can specify <parameter> elements to pass any necessary information to the transport. | Mandatory | |
<transportSender> | Just like <transportRecevier> , except <transportSender> allows you to define transport senders, which are used to send messages via the transport. | Mandatory | ||
<phaseOrder> | type | Specifies the order of phases in the execution chain of a specific type of flow (specified by the
You add phases using the | Mandatory | |
<phase> | name | The phase definition. The name attribute specifies the phase name. You can add the <handler> sub-element to execute a specific handler during this phase. | Mandatory | |
<handler> |
| 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 | |
<order> | phase | Optional | ||
<clustering> |
| Used to enable clustering. The class attribute specifies the clustering agent class. The enable attribute is false by default; set it to true to enable clustering. | Optional | |
<property> | 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 | ||
<enableMTOM> | locked | Enables Message Transmission Optimization Mechanism (MTOM) for HTTP messages. In WSO2 Enterprise Service Bus (ESB) 4.9.0, when it obtains an HTTP response with a payload, but without a content type header, it enables the response with MTOM, and thereafter processes the response with the content type header as multipart/related. If you are not using any MTOM-related use cases, you can explicitly disable MTOM for an artifact, by setting the value of this property to <?xml version="1.0" encoding="UTF-8"?> <definitions> <payloadFactory media-type="json"> <format>{"destination":"abc"}</format> <args /> </payloadFactory> <property name="enableMTOM" value="false" scope="axis2" /> <send /> </definitions> | False | Optional |
enable | False | |||
_ _ _<applicationDomain> | N/A | Optional | ||
name | ||||
port | ||||
subDomain | ||||
agent | ||||
description |
Example
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>