Enter your keyword

post

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!

Some Toughts (4)

  1. added on 14 Aug, 2017
    Reply

    i try this with JDEV 12.2.1 didn't find the XSD of response type

  2. added on 15 Aug, 2017
    Reply

    Dear Alaa,

    Please download the xsd from below link:

    https://drive.google.com/file/d/0BxLduUZuqFv-YUNUaXBpTnFQYnc/view?usp=sharing

    Regards,
    Ankur

  3. added on 21 Aug, 2017
    Reply

    You know, if it has changed in osb 12.2.1

  4. added on 30 May, 2019
    Reply

    Hi,
    I have a question regarding rest services in OSB 12c. I am exposing a soap pipeline as a rest service proxy. The service takes json as input and sends back json response. But I am getting ‘no response’ in return. Can you please help? I have posted the query on a forum, please can you have a look for detailed expaination?

    https://stackoverflow.com/questions/56210867/osb-getting-no-response-when-exposing-a-soap-based-pipeline-as-a-rest-service

    Thanks
    Pargat

Leave a Reply

Your email address will not be published.