[Blog Post] How to Aggregate Responses of Two REST Endpoints and Convert to JSON Using WSO2 ESB

  • By Lahiru Hettiarachchi Gamage
  • |
  • 1 Oct, 2014

Here is a use case I came across recently. In this use case, it will receive responses from two endpoints which are rest, aggregate them as a single body, which is XML, and convert it to JSON before sending a response.


  • Using clone mediator for cloning the message body and send it to two endpoints
  • Using aggregate mediator for aggregating the response from two endpoints
    • Enclosing the response using custom tag
  • Converting the XML response to JSON property mediator(messageType)



Click here to refer to Lahiru's blog.


About Author

  • Lahiru Hettiarachchi Gamage
  • Senior Technical Lead
  • WSO2 Inc