[Solved] How can I get the response body in WSO2 ESB

You can use the payloadFactory <payloadFactory media-type=”xml”> <format> <jsonObject> <cookie>$1</cookie> <product>$2</product> <place>$3</place> </jsonObject> </format> <args> <arg evaluator=”xml” expression=”//cookie”/> <arg evaluator=”xml” expression=”//product”/> <arg evaluator=”xml” expression=”//place”/> </args> </payloadFactory> But as already commented you need an enclosing element if not your xml will simply not be valid. If the goal is to output Json this element should be … Read more