mediatorcalloutwso2-esb

Callout and send mediator in wso2 esb


Can anybody explain with generic example what callout mediator does? and how to configure source and target ? How callout mediator is different from send mediator?


Solution

  • You can find a good explanation in the WSO2 Documentation of the Callout Mediator.

    Here is a simple example we often use to send the whole content and store the response inside a property:

    <callout serviceURL="http://wsf.cdyne.com/WeatherWS/Weather.asmx" action="http://ws.cdyne.com/WeatherWS/GetWeatherInformation">  
         <source type="envelope"/>
         <target key="response"/>
    </callout>
    
    <!-- print the response property -->
    <log level="custom">
        <property name="response" expression="get-property('response')"/>  
    </log>
    

    You can find another example here.