Invoke REST Services from SOA Suite 12.2.1.0.0

In my previous post we saw how to create a REST service using SOA Suite 12.2.1.0.0.

To view my previous post ClickHere

To invoke REST services we will use WADL file of the REST service. In our previous version of SOA Suite we use the HTTP bindings to invoke the REST service but in SOA Suite 12c we have REST binding to invoke the REST services.

We have created a composite with a BPEL process .Now we will add reference to the composite to invoke REST service.

To add reference to composite file, drag REST bindings from component palette.

Provide the name and select the checkbox “Reference will be invoked by components using wsdl interfaces” and click on Next.

invokerest

In resources window click on + button of “configuration shortcut” and select the “Add resources and operation mappings based on WADL service”.

invokerest1

It will open the WADL chooser window , select the WADL file it will automatically fill all the columns like operation, resource path, http verb and complete.

invokerest2.jpg

Now click on Finish , it will ask you you to have the local copy of all files, select all check boxes and click on OK.

invokerest3.jpg

Now wire the BPEL process with REST reference. And your composite looks like this.

invokerest4

Now inside the BPEL process add a invoke activity to invoke the REST service and assign input to it .

invokerest5

compile this service and deploy it to the server. Now we will either test this service from HTTP analyzer or from EM console

Test it from EM console, open the deployed composite and click on test. Provide input and test the service. You can see success response in response tab. If we open the instance we will find the new service successfully invoked the REST service and got the response.

invokerest6

Advertisements

2 thoughts on “Invoke REST Services from SOA Suite 12.2.1.0.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s