Hi.
The REST Adaptor Service allows hosting RESTful Web Services inside an ESB runtime (MQ) container. RESTful services are similar to traditional web applications because they process HTTP requests and respond by generating dynamic content. Therefore, a well designed domain of services will have a controller layer that converts HTTP parameters into service input objects and delegates the processing to the business logic. We already have a few great frameworks for building web application controllers.Struts (and its latest version Struts2) are an example of such an MVC framework. While Struts2 is great, it can only run in a context web/app server. The interesting part of this solution is that it enables Struts2 to execute in an ESB runtime container as if it implemented all essential aspects of the J2EE Servlet specification and process JMS messages as if they were HTTPServletRequests. ESB already contains components to convert HTTP requests into JMS messages (HTTP Acceptors) but then the developer is on their own processing a JMS message. This service allows developers to go beyond pure protocol translation and put a proven MVC framework to work for processing those messages and structuring their applications.
This idea was a result of a much less serious exercise: implementing a simple Web server using ESB and use it to host a simple Web app.The Web server was functional and allowed building and running a small GUI app. While using ESB instead of Tomcat is a cool idea, it probably violates a lot of best practices and is an example of using a wrong tool for the job; however using Struts to implement RESTful services and hosting them inside the ESB is a viable and useful technique.
Thanks
REST Adaptor Service Description.doc
Clear Innovation with SonicESB.
Thank you! Your entry has been received and recorded and your rules copy moved.