[WSO2 ESB] Transform Messages with WSO2 XSLT Mediator

Transforming messages is an essential part in enterprise messaging. There are several ways you can transform messages in WSO Enterprise Service Bus (ESB). With this post we try to transform a message using the WSO2 ESB XSLT mediator.


The use case is as follows, WSO2 ESB will get a request as shown in “Current Message”. ESB needs to transform this message before sending to the backend service. The backend service require the message to be in “Required Message” format.

Current Message (message received by ESB):


Required Message (message format required by the backend service):


To make the transformation possible we will be using the WSO2 ESB XSLT mediator. Transformation will be done according to the xslt provided to the service. The xslt should be as follows;
Testing this with WSO2 ESB can be done with a simple proxy service;

Test the transformation by sending the above “Current Message” to the proxy service.

One Reply to “[WSO2 ESB] Transform Messages with WSO2 XSLT Mediator”

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.