Monday, September 1, 2014

How to perform message transformation in WSO2 ESB

Message type transformations are basically done by both Message Builders and Message Formatters.

Their operation can be depicted on following diagram.

According to this image ... 

  • Message builder is chosen based on the content type of incoming message. The chosen builder processes the incoming message's raw payload and converts it in to soap.
  • Message formatter is chosen based on the content type of outgoing message. It builds the output stream based on the content type of message.

messageType” property can be used to change the content-type of the message.

Now Let us look an example scenario...


I am using the postman chrome plug-in as REST client.

The top part represents the JSON request and the bottom part represents the JSON response from the ESB.


I am using the JAX-RS service as my back end server. You can find the code here.


You can find the synapse configuration with transformation details.

You can further improve this synapse configuration by having switch-case, where you can define various builders or formatters based on the content-type of the incoming or outgoing messages.

How to over come "https not supported or disabled in libcurl" error when using CURL

If you see an error like this, You have to simply follow the following steps.

curl: (1) Protocol https not supported or disabled in libcurl


Uninstall the CURL and its dependencies from your machine

sudo apt-get remove --auto-remove curl


Download the CURL latest version from here.


Navigate to the extracted CURL package and configure it with SSL option.

./configure --with-ssl


now build the source.



install the CURL

make install