} else if (MediaType.APPLICATION_JSON.equals(messageContext.getResponseContext().getMediaType()) && messageContext.getResponseContext().isNeedToTransform()) {
log.trace("response transformation[JSON] started");
Transformer transformer = new DefaultJSONTransformer();
String output = transformer.marshal(messageContext.getResponseContext().getReturnObject());
messageContext.getResponseContext().setContent(output);
} else if (MediaType.TEXT_PLAIN.equals(messageContext.getResponseContext().getMediaType()) && messageContext.getResponseContext().isNeedToTransform()) {
log.trace("response transformation[Text] started");