Rabu, 11 Januari 2017

Consume REST service in Oracle Service Bus

This blog covers the implementation of REST adapter and how to consume REST service in Oracle Service Bus

In this implementation we are going to cover, how to consume the REST service in the OSB.

Consider we have a REST service deployed on the localhost and URI is http://localhost:7101/RESTServiceProject/RestService?deptId=50

For more information, how to create REST service, you can follow the blog

Now, let's start step by step explanation

1) Create a Service Bus application with Service Bus project

2) Open the composite and Right click on the Right Swim lane -> REST


2) Enter the Base URI, and click + sign from the Operation Bindings section, click Add operation binding


3) Enter the Operation name, select HTTP verb and enter deptId parameter in the URI parameters. Type must be int as the REST service takes int input. To select the int Type, change the Style from query to template, then change Type to int and then change the Style from template to query again.


4) Click on the Response Tab, select the XSD of response type, Click OK -> OK


5) Now Run the REST adapter



Done!

Tidak ada komentar:

Posting Komentar