Posts

Showing posts from February, 2012

A way to transform message content in between the client and the backend server - WSO2 Payload Factory Mediator

WSO2 ESB version - 4.0.3

WSO2 PayLoad Factory Mediator is for transforming or replacing message content in between the client and the backend server. Incomming message from client can be transformed by the Payload Factory mediator into the format expected by the service. Then the response message can be formatted into which is expected by the client.
Each argument in the mediator configuration could be a static value or an XPath expression. When an expression is used, argument value is fetched at runtime by evaluating the provided XPath expression against the existing SOAP message. Also the format of the request or response message can be configured which is mapped with the arguments provided in order.
For instance in the following the values for format parameters Code & Price will be assigned with values evaluated from args given in the specified order.

$1$2
A sample service of WSO2 Payload Factory Mediator can be found from here. The sample mediates the incomming message, send t…