[WSO2 ESB] How to use the call mediator?
In this post I will briefly explain what we can achieve with a call mediator.
By definition, the call mediator basically calls an external endpoint and then passes the message to the next mediator we have after the call mediator. This means we cannot use the call mediator by its own within the proxy. It always has to work with another mediator.
In example below, we have used a call mediator to invoke a back-end and then pass it to the out sequence, within the outSequence we use respond mediator to send the response back to the endpoint.
<?xml version="1.0" encoding="UTF-8"?>
<property name="message:" value=" Returned from callout"/>
<property name="status:" expression="get-property('axis2','HTTP_SC')"/>
<property name="status:" expression="$axis2:HTTP_SC"/>
value="+++++++++++++++++++++++++++++++++++++++++++++++++++++++ Hit Out Sequence +++++++++++++++++++++++++++++++++++++++++++"/>
Hope this helped you to understand the basic idea behind the call mediator.