Creating a generic RESTful gateway on the OSB
In this recipe, we will show you how to implement a RESTful gateway on the OSB, which will accept RESTful requests and then routes these requests to the real implementation of the service that can also be a RESTful service. This adds an additional layer of processing logic, which can be used for things such as auditing, security, and SLA monitoring.
We will use an external public service called Brewery DB, which offers a RESTful API (http://www.brewerydb.com/api/documentation) to execute queries for breweries, beers, styles, and other information about beer.
The gateway we implement will be generic in such a way that it accepts all the different requests through one single proxy service and then routes the request directly to the business service, wrapping the external RESTful API of the Brewery DB service.
Getting ready
To use the Brewery DB service API, an API key is needed. Just register for such an API key here: http://www.brewerydb.com/api...