<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
  ~  Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
  ~
  ~  WSO2 Inc. licenses this file to you under the Apache License,
  ~  Version 2.0 (the "License"); you may not use this file except
  ~  in compliance with the License.
  ~  You may obtain a copy of the License at
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~  Unless required by applicable law or agreed to in writing,
  ~  software distributed under the License is distributed on an
  ~  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~  KIND, either express or implied.  See the License for the
  ~  specific language governing permissions and limitations
  ~  under the License.
  -->

<axisconfig name="AxisJava2.0"  xmlns:svns="http://org.wso2.securevault/configuration">

    <!-- ================================================= -->
    <!--                  Parameters                       -->
    <!-- ================================================= -->

    <!-- Change this to true if you want to enable hot deployment of services -->
    <parameter name="hotdeployment" locked="false">true</parameter>
    <!-- Change this to true if you want to enable hot update of services -->
    <parameter name="hotupdate" locked="false">true</parameter>

    <!-- Change this to true if you want to enable MTOM -->
    <parameter name="enableMTOM" locked="false">{{server.enableMTOM}}</parameter>
    <!-- Change this to true if you want to enable SwA -->
    <parameter name="enableSwA" locked="false">{{server.enableSwA}}</parameter>

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

    <!-- Completely disable REST handling in Axis2/Synapse if the value is true -->
    <parameter name="disableREST" locked="false">false</parameter>

    <!-- Sandesha2 persistance storage manager -->
    <parameter name="Sandesha2StorageManager" locked="false">inmemory</parameter>

    <!-- Our HTTP endpoints can handle both REST and SOAP under the following service path. In -->
    <!-- case of a servlet container, if you change this you have to manually change the -->
    <!-- settings of your servlet container to map this context path to proper Axis2 servlets -->
    <parameter name="servicePath" locked="false">services</parameter>

    <!--the directory in which .aar services are deployed inside axis2 repository-->
    <parameter name="ServicesDirectory">axis2services</parameter>

    <!--the directory in which modules are deployed inside axis2 repository-->
    <parameter name="ModulesDirectory">axis2modules</parameter>

    <!-- User agent and the server details to be used in the http communication -->
    <parameter name="userAgent" locked="true">{{server.userAgent}}</parameter>
    <parameter name="server" locked="true">{{server.serverDetails}}</parameter>

    <!-- During a fault, stacktrace can be sent with the fault message. The following flag -->
    <!-- will control that behaviour -->
    <parameter name="sendStacktraceDetailsWithFaults" locked="false">false</parameter>

    <!-- If there aren't any information available to find out the fault reason, we set the -->
    <!-- message of the exception as the faultreason/Reason. But when a fault is thrown from -->
    <!-- a service or some where, it will be wrapped by different levels. Due to this the -->
    <!-- initial exception message can be lost. If this flag is set then, Axis2 tries to get -->
    <!-- the first exception and set its message as the faultreason/Reason. -->
    <parameter name="DrillDownToRootCauseForFaultReason" locked="false">false</parameter>

    <!-- Set the flag to true if you want to enable transport level session management -->
    <parameter name="manageTransportSession" locked="false">true</parameter>

    <!-- This will give out the timout of the configuration contexts, in milliseconds -->
    <parameter name="ConfigContextTimeoutInterval" locked="false">30000</parameter>

    <!-- Synapse Configuration file location relative to CARBON_HOME -->
    <parameter name="SynapseConfig.ConfigurationFile" locked="false">repository/deployment/server/synapse-configs</parameter>
    <!-- Synapse Home parameter -->
    <parameter name="SynapseConfig.HomeDirectory" locked="false">.</parameter>
    <!-- Resolve root used to resolve synapse references like schemas inside a WSDL -->
    <parameter name="SynapseConfig.ResolveRoot" locked="false">.</parameter>
    <!-- Synapse Server name parameter -->
    <parameter name="SynapseConfig.ServerName" locked="false">localhost</parameter>

    <!-- To override repository/services you need to uncomment following parameter and value -->
    <!-- SHOULD be absolute file path. -->
    <!--<parameter name="ServicesDirectory" locked="false">service</parameter>-->

    <!-- To override repository/modules you need to uncomment following parameter and value -->
    <!-- SHOULD be absolute file path. -->
    <!--<parameter name="ModulesDirectory" locked="false">modules</parameter>-->

    <!-- If you have a frontend host which exposes this webservice using a different public URL -->
    <!-- use this parameter to override autodetected url -->
    <!--<parameter name="httpFrontendHostUrl" locked="false">https://someotherhost/context</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"/>-->

    <!-- POJO service deployer for Jar -->
    <!--<deployer extension="jar" class="org.apache.axis2.deployment.POJODeployer" directory="pojoservices"/>-->

    <!-- POJO service deployer for Class -->
    <!--<deployer extension="class" class="org.apache.axis2.deployment.POJODeployer" directory="pojoservices"/>-->

    <!-- JAXWS service deployer -->
    <!--<deployer extension=".jar" class="org.apache.axis2.jaxws.framework.JAXWSDeployer" directory="servicejars"/>-->

    <!-- ================================================= -->
    <!--                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="{{message_formatter.form_urlencoded}}"/>
    <messageFormatter contentType="multipart/form-data"
                              class="{{message_formatter.multipart_form_data}}"/>
    <messageFormatter contentType="application/xml"
                              class="{{message_formatter.application_xml}}"/>
    <messageFormatter contentType="text/xml"
                              class="{{message_formatter.text_xml}}"/>
    <messageFormatter contentType="application/soap+xml"
                              class="{{message_formatter.soap_xml}}"/>
    <messageFormatter contentType="application/json"
                              class="{{message_formatter.json}}"/>
    <messageFormatter contentType="application/json/badgerfish"
                              class="{{message_formatter.json_badgerfish}}"/>
    <messageFormatter contentType="text/javascript"
                              class="{{message_formatter.text_javascript}}"/>
    <messageFormatter contentType="text/plain"
                         class="{{message_formatter.text_plain}}"/>

        <messageFormatter contentType="text/html"
                          class="{{message_formatter.text_html}}"/>

        <messageFormatter contentType="application/octet-stream"
                          class="{{message_formatter.octet_stream}}"/>

    </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="{{message_builder.application_xml}}"/>
    <messageBuilder contentType="application/x-www-form-urlencoded"
                            class="{{message_builder.form_urlencoded}}"/>

    <messageBuilder contentType="multipart/form-data"
                            class="{{message_builder.multipart_form_data}}"/>
    <messageBuilder contentType="application/json"
                            class="{{message_builder.json}}"/>
    <messageBuilder contentType="application/json/badgerfish"
                            class="{{message_builder.json_badgerfish}}"/>
    <messageBuilder contentType="text/javascript"
                            class="{{message_builder.text_javascript}}"/>
    <messageBuilder contentType="text/html"
                        class="{{message_builder.text_html}}"/>
        <messageBuilder contentType="text/plain"
                        class="{{message_builder.text_plain}}"/>
        <messageBuilder contentType="application/octet-stream"
                        class="{{message_builder.octet_stream}}"/>
    </messageBuilders>

    <!-- ================================================= -->
    <!--             Transport Ins (Listeners)             -->
    <!-- ================================================= -->

    <transportReceiver name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpListener">
     {% for parameter_key,parameter_value in transport.passthru_http.listener.parameters.items() %}
        <parameter name="{{parameter_key}}" locked="false">{{parameter_value}}</parameter>
    {% endfor %}
    </transportReceiver>

   <transportReceiver name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpMultiSSLListener">
     {% for parameter_key,parameter_value in transport.passthru_https.listener.parameters.items() %}
        <parameter name="{{parameter_key}}" locked="false">{{parameter_value}}</parameter>
    {% endfor %}
            <parameter name="keystore" locked="false">
            <KeyStore>
                <Location>{{transport.passthru_https.listener.key_store.location}}</Location>
                <Type>{{transport.passthru_https.listener.key_store.type}}</Type>
                <Password>{{transport.passthru_https.listener.key_store.password}}</Password>
                <KeyPassword>{{transport.passthru_https.listener.key_store.key_password}}</KeyPassword>
            </KeyStore>
        </parameter>
        <parameter name="truststore" locked="false">
            <TrustStore>
                <Location>{{transport.passthru_https.listener.trust_store.location}}</Location>
                <Type>{{transport.passthru_https.listener.trust_store.type}}</Type>
                <Password>{{transport.passthru_https.listener.trust_store.password}}</Password>
            </TrustStore>
        </parameter>
       <!-- ============================================== -->
       <!-- Configuration for Listener Dynamic SSL Profile loading. -->
       <!-- Configured for 10 mins. -->
       <!-- ============================================== -->
       <parameter name="dynamicSSLProfilesConfig">
           <filePath>repository/resources/security/listenerprofiles.xml</filePath>
           <fileReadInterval>{{transport.passthru_https.listener.ssl_profile_interval}}</fileReadInterval>
       </parameter>
    </transportReceiver>


    <transportReceiver name="local" class="org.wso2.carbon.core.transports.local.CarbonLocalTransportReceiver"/>

    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)-->
    {% if transport.jms.listener.connection_factories is defined %}
    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
    {% for connection_factory in transport.jms.listener.connection_factories %}
        <parameter name="{{transport.jms.listener[connection_factory].name}}" locked="false">
        {% for name,value in transport.jms.listener[connection_factory].parameters.items() %}
                <parameter name="{{name}}" locked="false">{{value}}</parameter>
         {% endfor %}
        </parameter>
        {% endfor %}
    </transportReceiver>
    {% endif %}


    <!-- ================================================= -->
    <!--             Transport Outs (Senders)              -->
    <!-- ================================================= -->

    <transportSender name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpSender">
         {% for parameter_key,parameter_value in transport.passthru_http.sender.parameters.items() %}
            <parameter name="{{parameter_key}}" locked="false">{{parameter_value}}</parameter>
        {% endfor %}
    </transportSender>

    <transportSender name="local" class="org.wso2.carbon.core.transports.local.CarbonLocalTransportSender"/>


    <transportSender name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpSSLSender">
         {% for parameter_key,parameter_value in transport.passthru_https.sender.parameters.items() %}
            <parameter name="{{parameter_key}}" locked="false">{{parameter_value}}</parameter>
        {% endfor %}
        <parameter name="keystore" locked="false">
            <KeyStore>
                <Location>{{transport.passthru_https.sender.key_store.location}}</Location>
                <Type>{{transport.passthru_https.sender.key_store.type}}</Type>
                <Password>{{transport.passthru_https.sender.key_store.password}}</Password>
                <KeyPassword>{{transport.passthru_https.sender.key_store.key_password}}</KeyPassword>
            </KeyStore>
        </parameter>
        <parameter name="truststore" locked="false">
            <TrustStore>
                <Location>{{transport.passthru_https.sender.trust_store.location}}</Location>
                <Type>{{transport.passthru_https.sender.trust_store.type}}</Type>
                <Password>{{transport.passthru_https.sender.trust_store.password}}</Password>
            </TrustStore>
        </parameter>
        <!-- ============================================== -->
        <!-- Configuration for Dynamic SSL Profile loading. -->
        <!-- Configured for 10 mins. -->
        <!-- ============================================== -->
        <parameter name="dynamicSSLProfilesConfig">
            <filePath>{{transport.passthru_https.sender.ssl_profile.file_path}}</filePath>
            <fileReadInterval>{{transport.passthru_https.sender.ssl_profile.interval}}</fileReadInterval>
        </parameter>
    </transportSender>

{% if transport.jms.sender.connection_factories is defined %}
     <transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender">
         {% for connection_factory in transport.jms.sender.connection_factories %}
             <parameter name="{{transport.jms.sender[connection_factory].name}}" locked="false">
             {% for name,value in transport.jms.sender[connection_factory].parameters.items() %}
                     <parameter name="{{name}}" locked="false">{{value}}</parameter>
              {% endfor %}
             </parameter>
            {% endfor %}
      </transportSender>
{% endif %}

{% if transport.ws.sender.enable %}
    <transportSender name="ws" class="org.wso2.carbon.websocket.transport.WebsocketTransportSender">
             {% for name,value in transport.ws.sender.parameters.items() %}
                     <parameter name="{{name}}" locked="false">{{value}}</parameter>
              {% endfor %}
    </transportSender>
{%endif%}
{%if transport.wss.sender.enable %}
    <transportSender name="wss" class="org.wso2.carbon.websocket.transport.WebsocketTransportSender">
  {% for name,value in transport.wss.sender.parameters.items() %}
        <parameter name="{{name}}" locked="false">{{value}}</parameter>
   {% endfor %}
        <parameter name="ws.trust.store" locked="false">
            <ws.trust.store.location>{{transport.wss.sender.trust_store.location}}</ws.trust.store.location>
            <ws.trust.store.Password>{{transport.wss.sender.trust_store.password}}</ws.trust.store.Password>
        </parameter>
    </transportSender>
{%endif%}

    <!-- ================================================= -->
    <!--             Global Engaged Modules                -->
    <!-- ================================================= -->

    <!-- Comment this out to disable Addressing -->
    <module ref="addressing"/>

    <!--
    Uncomment out the following entry if SOAP (text/xml and application/soap+xml) messages
    are processed through the message relay.
    -->
    <!--module ref="relay"/-->


    <!-- ================================================= -->
    <!--                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="{{clustering.membership_scheme is defined}}">

        <!--
           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 membership scheme used in this setup. The only values supported at the moment are
           "multicast" and "wka"

           1. multicast - membership is automatically discovered using multicasting
           2. wka - Well-Known Address based multicasting. Membership is discovered with the help
                    of one or more nodes running at a Well-Known Address. New members joining a
                    cluster will first connect to a well-known node, register with the well-known node
                    and get the membership list from it. When new members join, one of the well-known
                    nodes will notify the others in the group. When a member leaves the cluster or
                    is deemed to have left the cluster, it will be detected by the Group Membership
                    Service (GMS) using a TCP ping mechanism.
        -->
        <parameter name="membershipScheme">{{clustering.membership_scheme | default('multicast')}}</parameter>
        <!--<parameter name="licenseKey">xxx</parameter>-->
        <!--<parameter name="mgtCenterURL">http://localhost:8081/mancenter/</parameter>-->

        <!--
         The clustering domain/group. Nodes in the same group will belong to the same multicast
         domain. There will not be interference between nodes in different groups.
        -->
        <parameter name="domain">{{clustering.domain | default('wso2.carbon.domain')}}</parameter>

        <!-- The multicast address to be used -->
        <!--<parameter name="mcastAddress">228.0.0.4</parameter>-->

        <!-- The multicast port to be used -->
        <parameter name="mcastPort">45564</parameter>

        <parameter name="mcastTTL">100</parameter>

        <parameter name="mcastTimeout">60</parameter>

        <!--
           The IP address of the network interface to which the multicasting has to be bound to.
           Multicasting would be done using this interface.
        -->
        <!--
            <parameter name="mcastBindAddress">127.0.0.1</parameter>
        -->
        <!-- The host name or IP address of this member -->

        <parameter name="localMemberHost">{{clustering.local_member_host}}</parameter>

        <!--
            The bind adress of this member. The difference between localMemberHost & localMemberBindAddress
            is that localMemberHost is the one that is advertised by this member, while localMemberBindAddress
            is the address to which this member is bound to.
        -->
        <!--
        <parameter name="localMemberBindAddress">127.0.0.1</parameter>
        -->

        <!--
        The TCP port used by this member. This is the port through which other nodes will
        contact this member
         -->
        <parameter name="localMemberPort">{{clustering.local_member_port | default('4000')}}</parameter>

        {% for property_name,property_value in clustering.properties.items() %}
        <parameter name="{{property_name}}">{{property_value}}</parameter>
        {% endfor %}

        <!--
            The bind port of this member. The difference between localMemberPort & localMemberBindPort
            is that localMemberPort is the one that is advertised by this member, while localMemberBindPort
            is the port to which this member is bound to.
        -->
        <!--
        <parameter name="localMemberBindPort">4001</parameter>
        -->

        <!--
        Properties specific to this member
        -->
        <parameter name="properties">
            <property name="backendServerURL" value="https://${hostName}:${httpsPort}/services/"/>
            <property name="mgtConsoleURL" value="https://${hostName}:${httpsPort}/"/>
            <property name="subDomain" value="worker"/>
        </parameter>

        <!--
           The list of static or well-known members. These entries will only be valid if the
           "membershipScheme" above is set to "wka"
        -->
          <members>
            {% for member in clustering.members %}
            {% set splittedMember = member.split(':') %}
            <member>
                <hostName>{{splittedMember[0]}}</hostName>
                <port>{{splittedMember[1]}}</port>
            </member>
            {% endfor %}
        </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.apim.domain"
                               description="APIM 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">
            <!--TEMPORALY-->
            <!--handler name="TenantActiveCheckDispatcher"
                     class="org.wso2.carbon.tenant.dispatcher.TenantActiveCheckDispatcher">
                <order phase="Transport"/>
            </handler-->
            <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="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-->
            <!-- TEMPORALY-->
            <!--handler name="CacheMessageBuilderDispatchandler"
                     class="org.wso2.carbon.mediation.initializer.handler.CacheMessageBuilderDispatchandler"/-->
            <handler name="CarbonContentConfigurator"
                     class="org.wso2.carbon.mediation.initializer.handler.CarbonContextConfigurator"/>
        </phase>
        <phase name="Addressing">
            <handler name="AddressingBasedDispatcher"
                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
                <order phase="Addressing"/>
            </handler>

        </phase>
        <phase name="Security"/>
        <phase name="PreDispatch"/>
        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
            <handler name="RequestURIBasedDispatcher"
                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
            <handler name="SOAPActionBasedDispatcher"
                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
            <handler name="RequestURIOperationDispatcher"
                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
            <handler name="SOAPMessageBodyBasedDispatcher"
                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

	    <handler name="HTTPLocationBasedDispatcher"
                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
            <handler name="MultitenantDispatcher"
                     class="org.wso2.carbon.tenant.dispatcher.MultitenantDispatcher"/>
            <handler name="SynapseDispatcher"
                     class="org.apache.synapse.core.axis2.SynapseDispatcher"/>
            <handler name="SynapseMustUnderstandHandler"
                     class="org.apache.synapse.core.axis2.SynapseMustUnderstandHandler"/>
        </phase>
        <!--  System pre defined phases       -->
        <phase name="RMPhase"/>
        <phase name="OpPhase"/>
        <phase name="AuthPhase"/>
        <phase name="MUPhase"/>
        <!-- After Postdispatch phase module author or or service author can add any phase he want -->
        <phase name="OperationInPhase"/>
    </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"/>
        <phase name="MUPhase"/>
        <phase name="OpPhase"/>
        <phase name="OperationOutPhase"/>
        <!--system predefined phase-->
        <!--these phase will run irrespective of the service-->
        <phase name="PolicyDetermination"/>
		<!--security handler for pass through -->
		<phase name="PTSecurityOutPhase">
			<handler name="RelaySecuirtyMessageBuilderDispatchandler"
                     class="org.apache.synapse.transport.passthru.util.RelaySecuirtyMessageBuilderDispatchandler"/>
        </phase>
        <phase name="MessageOut"/>
        <phase name="Security"/>

        <!--
           The MsgOutObservation phase is used tju,o observe messages just before the
           responses are sent out. In this phase, we could do some things such as SOAP message
           tracing & keeping track of the time at which a particular response was sent.

           NOTE: This should be the very last phase in this flow
        -->
        <phase name="MsgOutObservation"/>
    </phaseOrder>

    <phaseOrder type="InFaultFlow">
        <!--
           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"/>
	<phase name="Validation"/>

        <phase name="Transport">
            <handler name="RequestURIBasedDispatcher"
                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
                <order phase="Transport"/>
            </handler>
            <handler name="SOAPActionBasedDispatcher"
                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
                <order phase="Transport"/>
            </handler>
	    <handler name="CarbonContentConfigurator"
            class="org.wso2.carbon.mediation.initializer.handler.CarbonContextConfigurator"/>
           </phase>

           <phase name="Addressing">
            <handler name="AddressingBasedDispatcher"
                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
                <order phase="Addressing"/>
            </handler>
           </phase>

        <phase name="Security"/>
        <phase name="PreDispatch"/>
        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
            <handler name="RequestURIBasedDispatcher"
                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
            <handler name="SOAPActionBasedDispatcher"
                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
            <handler name="RequestURIOperationDispatcher"
                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
            <handler name="SOAPMessageBodyBasedDispatcher"
                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

            <handler name="HTTPLocationBasedDispatcher"
                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
        </phase>
        <!--      user can add his own phases to this area  -->
        <phase name="RMPhase"/>
        <phase name="OpPhase"/>
        <phase name="MUPhase"/>
        <phase name="OperationInFaultPhase"/>
    </phaseOrder>

    <phaseOrder type="OutFaultFlow">
        <!-- 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"/>
        <!-- Must Understand Header processing phase -->
        <phase name="MUPhase"/>
        <phase name="OperationOutFaultPhase"/>
        <phase name="PolicyDetermination"/>
        <phase name="MessageOut"/>
        <phase name="Security"/>
	<phase name="Transport"/>
        <!--
           The MsgOutObservation phase is used to observe messages just before the
           responses are sent out. In this phase, we could do some things such as SOAP message
           tracing & keeping track of the time at which a particular response was sent.

           NOTE: This should be the very last phase in this flow
        -->
        <phase name="MsgOutObservation"/>
    </phaseOrder>

</axisconfig>
