Following java class invoke the given proxy (proxy name should be given as the parameter) and the inbuilt message body is send to the specified proxy service.
NOTE: Following sample is scheduled task implementation class in WSO2 ESB. Continue reading
In a situation like you want to send a message back to the client depending on some conditions, we can use Respond Mediator. This mediator stops the processing on the current message and sends the message back to the client as a response. So just before this mediator we can use mediator like Payload Factory Mediator to construct the response.
Following is a simple use case for this,