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:

Exposing a RESTful service on the OSB

Getting ready

Import the SoapUI project

Get Oracle Service Bus 11g Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.