HOW TO CONSUME REST WEBSERVICE IN ORACLE SOA 12c
(REST ADAPTER IN SOA 12c)
1.Create a SOA
Project named RESTInvoke
2.Create a Synchronous BPEL process
3.Drag and
drop the REST Adapter into the external References
4.Give the
name for Rest Reference and choose the appropriate option
5.Enter the
Base URI and the resource path of your Rest WebService
6.Create
Methods to invoke the WebService
7.Give name
for the method,choose the resource path and then choose the operation that you
are going to perform.Here I have used GET method.
8.Create URI
parameters for the request.
9.Give name
for the parameter and choose the style for the parameter.There are two Styles
available.
#QUERY parameters are the most common type of
parameter, which is appended to the path of the URL when submitting a request.
# TEMPLATE parameters are a flexible way of
parameterizing the actual path of the request.
I have selected query parameter.We can
specify the default value also.I have given 77 as the default value.
10.Click finish to complete the rest
configuration wizard.
11.Create a
wire between BPEL and Rest Adapter
12.Create two
json Variables for Invoke input and Invoke Output
13.Drag and drop the invoke activity.
14.Create a
wire between invoke and RestReference
15.Choose the
method that we are going to invoke and choose the input and output variables.
16.Map the input variables.
17.Map the Output Variables.
18.Now you can
deploy and test the Service.