Oracle SOA Suite 12c:
REST-Enabling SOA with Oracle Service Bus
Overview
Purpose
This tutorial shows you how to REST-enable an existing Simple
Object Access Protocol (SOAP) service by using Oracle Service Bus.
Time to Complete
Approximately 30 minutes
Introduction
Most existing web applications are connected through web
services, which are commonly known as SOAP services. More and more
users are relying on mobile devices for communication, and they’re
looking for lighter ways to access enterprise information on the
go. REST services are the answer for the mobile device platform,
because they get rapid responses and fast access to data.
Oracle Service Bus provides a virtualization layer to support
REST, which means that only proxy and business services are
REST-based. These REST services invoke, or are invoked by, a Web
Service Description Language (WSDL) pipeline or a split-join. REST
proxy services convert the REST native payload to SOAP before
invoking a pipeline or split-join, while REST business services
invoked by a pipeline or a split-join convert the payload from
SOAP to REST. The internal interface is based on WSDL, whereas the
external business and proxy services expose REST endpoints.
In this tutorial, you REST-enable a service by using an
application that validates credit cards. The application validates
the requested authorization amount for the credit card number, and
it returns the response in XML or JavaScript Object Notation
(JSON) format, the common data formats for mobile devices.
Hardware and Software Requirements
A Windows, Mac OS X, or Linux machine that meets the system
requirements for Oracle SOA Suite 12c
Note: This tutorial was created with Windows 7.
If you use another operating system, the paths may be different.
On the Deploy ValidatePayment page, enter,
select, or verify the following values on the specified pages,
click Next on each page, and then click Finish
on the Summary page after you review your
selections:
Deployment Action page: Select Deploy
to Application Server.
Deploy Configuration page: Enter or
verify 1.0 for the New revision ID
field, and select Overwrite any existing composites
with the same revision ID.
Select Server page: Select IntegratedWebLogicServer.
SOA Servers page: Verify that the default
server is running and selected.
The Response Document body displays the
status of the request in Extensible
Markup Language (XML) format. The status can be
Authorized or Denied, and it's based on the requested
authorization amount.
Exposing a SOAP Service as a REST Service
In this section, you expose the existing SOAP service as a REST
service.
In the Pipelines/Split-Joins swimlane,
right-click ValidatePP, and select Expose
As REST.
The Response Document body displays the
status of the request in JSON format. The status can be
Authorized or Denied, and it's based on the requested
authorization amount.
Summary
Oracle Service Bus enables you to reuse the SOAP services that
are in use today, and expose them as REST services to support
mobile devices.
When you use REST-enabling in Oracle Service Bus, you can set
the response format as XML and JSON, so that the mobile devices
can consume data as needed.
In this tutorial, you learned to:
Test and execute a SOAP service by using the Oracle Service
Bus Console
Expose a SOAP service as a REST service
Test and execute a REST service by using the Oracle Service
Bus Console