Tags

,

Wso2 ESB is using to handle real world integration scenarios with the messages transforming and routing.The mediation process of the Wso2 ESB is handled by Synapse mediation engine.

synapse-arch

Let’s take following proxy service configuration.

<proxy name="Sampleproxy" startOnLoad="true" transports="http https" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence>
<log>
<property name="in" value="==== IN ===="/>
</log>
<send>
<endpoint>
<address uri="http://172.18.0.1:9764/services/Version/"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<log>
<property name="out" value="=== OUT ===="/>
</log>
<send/>
</outSequence>
<faultSequence/>
</target>
</proxy>

When we invoking above proxy service deployed in Wso2 ESB, Synapse mediation engine execute following classes and methods
to handle the request payload.

In Flow (Request flow)

org.apache.synapse.core.axis2.ProxyServiceMessageReceiver#receive
org.apache.synapse.core.axis2.ProxyService#registerFaultHandler
org.apache.synapse.mediators.base.SequenceMediator#mediate(org.apache.synapse.MessageContext)
org.apache.synapse.mediators.AbstractListMediator#mediate(org.apache.synapse.MessageContext)
org.apache.synapse.mediators.AbstractListMediator#mediate(org.apache.synapse.MessageContext, int)
org.apache.synapse.mediators.AbstractListMediator#buildMessage
org.apache.synapse.mediators.builtin.LogMediator#mediate
org.apache.synapse.mediators.builtin.SendMediator#mediate
org.apache.synapse.endpoints.AddressEndpoint#send
org.apache.synapse.endpoints.AbstractEndpoint#send
org.apache.synapse.core.axis2.Axis2SynapseEnvironment#send
org.apache.synapse.core.axis2.Axis2Sender#sendOn
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient#send
org.apache.axis2.client.OperationClient#execute
org.apache.synapse.core.axis2.DynamicAxisOperation.DynamicOperationClient#executeImpl
org.apache.synapse.core.axis2.DynamicAxisOperation.DynamicOperationClient#send
org.apache.axis2.engine.AxisEngine#send

Out Flow (Response flow)

org.apache.axis2.engine.AxisEngine#receive
org.apache.synapse.core.axis2.SynapseCallbackReceiver#receive
org.apache.synapse.core.axis2.SynapseCallbackReceiver#handleMessage
org.apache.synapse.core.axis2.Axis2SynapseEnvironment#injectMessage(org.apache.synapse.MessageContext)
org.apache.synapse.mediators.base.SequenceMediator#mediate(org.apache.synapse.MessageContext)
org.apache.synapse.mediators.AbstractListMediator#mediate(org.apache.synapse.MessageContext)
org.apache.synapse.mediators.AbstractListMediator#mediate(org.apache.synapse.MessageContext, int)
org.apache.synapse.mediators.AbstractListMediator#buildMessage
org.apache.synapse.mediators.builtin.LogMediator#mediate
org.apache.synapse.mediators.builtin.SendMediator#mediate
org.apache.synapse.core.axis2.Axis2SynapseEnvironment#send
org.apache.synapse.core.axis2.Axis2Sender#sendBack
org.apache.axis2.engine.AxisEngine#send

Hope above information will help you to debug the synapse mediation engine.

Advertisements