Exposing a RESTful service on the OSB
In this recipe, we will show how to REST-enable an existing service. We will reuse the CRM mock service used in Chapter 1, Creating a Basic OSB Service, but instead of exposing it as a SOAP-based web service as shown in Chapter 1, Creating a Basic OSB Service; we will expose it as a RESTful web service.
For that we first implement a business service that wraps the SOAP-based web service of the CRM system (a soapUI mock service). Then we create a proxy service using the HTTP transport and conditionally executing an action based on the HTTP method passed by the consumer:
Getting ready
Import the SoapUI project CustomerServiceCRM-soapui-project.xml
from the location \chapter-5\getting-ready\exposing-restful-service\soapui
into your SoapUI. Start the mock service CustomerServiceSOAP MockService
.
Import the base OSB project containing the right folder structure and the necessary XQuery transformations into Eclipse from \chapter-5\getting-ready\exposing-restful...