WSO2 ESB comes with an assortment of useful mediators to filter, transform, route and manipulate messages. When the existing mediators come short, you can write your own mediators to implement your specific business requirements. Your custom mediators can be plugged into WSO2 ESB quite easily. After adding them to ESB they function as first class citizens the same as core mediators which come with the product. The custom mediators can be distributed in packaged form which can be installed in another WSO2 ESB instance. In this article I will show you how to write a custom mediator to extend the WSO2 ESB or Apache Synapse functionality to fulfill your business requirements.
Read the article at http://wso2.com/library/2898