Thursday, December 5, 2019

How to Invoke REST Adapter in OIC from SOAP Service

How to Invoke REST Adapter in OIC from SOAP Service.?

To Invoke a Rest Adapter from a SOAP Service. First we need to create 2 connections,
1. SOAP Adapter which will be exposed to external system
2. REST Adapter which will be invoked by our Integration.

Please note, the REST service should be already created for this use-case. I have used the REST service which was created in my previous blog.


SOAP Adapter:



Select the concrete WSDL and configure the security as Basic Authentication.

Now we are creating REST Adapter connection.


Please make sure you provide only the Host and Port not the entire Rest URL in Connection URL.
Also provide the security details and test, save it.

Now you can see both the connections in active, ready to use state.


Now lets create the Integration, select App Driven Orchestration.



Select the SOAP Adapter created above.

Create the endpoint and leave the others to default.


Now drag and drop Invoke(REST Adapter Connection created above) right above the Map to TestSOAP-Rest.

To configure the Rest adapter,
The Endpoint will not have Host-port details, since its already provided in Connections.
So configure it as shown below.
Please note, it doesn't have the Input elements in the URL too.


Define the input required for this Rest adapter .

Select the XML as response by choosing the Schema file.

Now lets map the request to Rest Adapter.



Here we will map the response from REST adapter to response of SOAP service.


Now enable the tracing and activate it.

Create a SOAP UI project to test it.

REST Adapter in OIC

How to use REST Adapter in OIC.?

Login to Console and Navigate to Integrations.

Navigate to Connections.


Select the REST Adapter in Create Connections.


Since we want to expose our integration as REST, Select the Role as Trigger.
If we wanted to invoke a rest adapter, we would create with Role as "Invoke".


There is nothing to configure, so just Test and Save the connection.


Now we have to create the Integration and use the Connection.


 Select App Driven Orchestration.



Select the Connection you have created above.

 Now we have to configure the Input/Output format along with endpoint as shown below.
I'm receiving 2 string elements as input and responding XML element as output.


Note: You can Configure the action as POST too, which will give you option to accept the request as XML,JASON types as well.



Once the configuration is done. Click on the Map to edit the output.


 Enable the Tracing and activate the Integration.






Hello World Program with SOAP Adapter - Click Here
Invoke REST Adapter - Click Here

Wednesday, December 4, 2019

How to import OIC Project (.iar) file in Jdeveloper

How to Import .iar in Jdeveloper

Export the Project from OIC Console.


Open Jdeveloper 12c and Create a new Service Bus Application with the project name same as your OIC project name.


Once the Project is created, click File-> Import.






Now you can edit the XSL's manually and upload it back into your OIC project.

Hello World in OIC - with SOAP Adapter

Below Post will explain the steps to create a Hello World Web-Service in OIC. Its a simple project, with all the screenshots provided. I have tried to compare it with OSB/BPEL for easy understanding.

Once you login to the console, Below is the Home page. Please click on Integrations.


Once you click on Integrations, it will take you to the Designer console.
First we need to create a Connections, It will be exposed as a webservice to external system.
Creating Connections is similar to Proxy Service (OSB) or Exposed Service in BPEL.



Select SOAP Adapter.


Provide a relevant name.
Trigger - Equivalent to Proxy service(OSB) or Exposed Service (BPEL)
Invoke - Equivalent to Business service(OSB) or External Reference (BPEL)
Trigger and Invoke - Can be used as both.



You need to select a Concrete WSDL here. Which will be exposed to the external system.



All the SOAP webservice have to be protected with security. (This usually will be the username-password which you used to login)

Once done, you have to click on Test and make sure you have 100% which means you don't have any error and the connection is ready to use.



Now we will create the Integration where the flow is defined. Which is similar to Proxy Pipeline(OSB) or BPEL (BPEL).


Select the App Driven Orchestration.



Select the connection you have created in above steps.
Note: If your connection doesn't appear here, it means the connection is not 100% and not ready to use. Go back and check the connection.

 Configure the endpoint and leave all the others with default.

It will create a flow with a default mapping in it.
 Select the edit icon for mapping input-output.
For simpler mapping you can click and drag it from Source to target. If you want to use functions, click on the element name.


Select the function you want to use from left tab and complete your mapping.



Once the mapping is complete you can see there is an error on home page. This is a warning message is set the Instance Tracking.



Save the Project.


Once you activate it, it will provide the URL for you to test.


Create a SOAP UI project and test it.


Courtesy : Naresh Pagidipala, who taught me the basis of OIC.