This documentation is for WSO2 Message Broker 3.0.0. View documentation for the latest release.
Due to a known issue do not use JDK1.8.0_151 with WSO2 products. Use JDK 1.8.0_144 until JDK 1.8.0_162-ea is released.
Skip to end of metadata
Go to start of metadata

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 elementAttributesDescriptionData typeDefault valueMandatory/Optional
<axisconfig> name The root element. The name is defined as: name="AxisJava2.0"  Mandatory
<module>refA globally engaged module. The ref attribute specifies the module name.  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 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>classA 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.

The container element for messages receiver definitions. 




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



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



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



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

Specifies the order of phases in the execution chain of a specific type of flow (specified by the type attribute), which can be one of the following:

  • InFlow
  • OutFlow
  • InFaultFlow
  • OutFaultFlow

You add phases using the <phase> sub-element. In the In phase orders, all phases before the Dispatch phase are global phases and after Dispatch are operation phases. In the Out phase orders, phases before the MessageOut phase are global phases and after MessageOut are operation phases.

<phase>nameThe 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



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



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
_ _<members> The list of static or well-known members. These entries will only be valid if the "membershipScheme" above is set to "wka" N/AOptional
_ _ _<member>   N/AOptional
_ _ _ _<hostName>   N/AOptional
_ _ _ _<port>   N/AOptional
_ _<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/AOptional


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 -->
        <messageReceiver mep=""
        <messageReceiver mep=""
        <messageReceiver mep=""

    <!-- ================================================= -->
    <!--                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. -->
        <messageFormatter contentType="application/x-www-form-urlencoded"
        <messageFormatter contentType="multipart/form-data"
        <messageFormatter contentType="application/xml"
        <messageFormatter contentType="text/xml"
        <messageFormatter contentType="application/soap+xml"
        <messageFormatter contentType="text/plain"



    <!-- ================================================= -->
    <!--                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. -->
        <messageBuilder contentType="application/xml"
        <messageBuilder contentType="application/x-www-form-urlencoded"
        <messageBuilder contentType="multipart/form-data"
        <messageBuilder contentType="text/plain"



    <!-- ================================================= -->
    <!--             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>-->


    <!-- ================================================= -->
    <!--             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>-->


    <!-- ================================================= -->
    <!--             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"

           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"

        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"

    <!-- ================================================= -->
    <!--                   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>

    <!-- ================================================= -->
    <!--                    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"
        <phase name="Validation"/>
        <phase name="Transport">
            <handler name="RequestURIBasedDispatcher"
                <order phase="Transport"/>
               <handler name="CarbonContextConfigurator"
            <handler name="RelaySecuirtyMessageBuilderDispatchandler"
            <handler name="SOAPActionBasedDispatcher"
                <order phase="Transport"/>
            <!--handler name="SMTPFaultHandler"
                <order phase="Transport"/>
           <handler name="CacheMessageBuilderDispatchandler"

    <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"/>



  • No labels