Exposing Web Service as REST API
Oracle Fusion ERP Cloud provides numerous Web / REST Services for integration and with each release Oracle is adding more and more services. I have come across scenarios where you have a Web Service available for integration but don't have the equivalent REST Service available.
This might be a problem when you are developing custom applications in VBCS as VBCS can only work with REST Services at this point of time. To overcome this problem, we can leverage Integration Cloud and expose the Web Service as REST API.
In this post I will provide details around how to expose Web Services as REST API using OIC.
Create a REST Connector and Configure the Connection / Security details.
Create an Oracle ERP Cloud adapter and Configure the Connection / Security details.
Create a new Integration and Select Basic Routing Style.
Enter the relevant integration details after selecting the style (Integration Name, Identifier, Description and Package Details)
Select the REST Connector and drop it on the Trigger Section and Enter the details as shown below.
Click on next to configure the Request details of the service.
I have used the below JSON data to configure request.
{ "OrganizationCode" : "XX", "ItemClass" : "Root Item Class", "ItemNumber" : "Test Demo Item - 001", "ItemDescription" : "Test Demo Item - 001", "ItemStatusValue" : "Active", "LifecyclePhaseValue" : "Production", "PrimaryUOMValue" : "Each" }
Click on Next to configure the Response details.
I have used the below JSON data for configuring the response.
{ "ItemId" : 999994000402981, "OrganizationId" : 111, "OrganizationCode" : "XX", "ItemCatalogGroupId" : 100000011369001, "ItemClass" : "Root Item Class",
..................}
Now select the Oracle ERP Cloud adapter and drop it in the Invoke section and add the details as shown below.
Now add the mapping for request (mapping data between REST and ERP Cloud connector) and response (mapping data from ERP Cloud to REST Connector) as shown below.
Add the business identifier details for tracking.
Save the changes and activate the application.
Copy the Endpoint details as shown below (this endpoint will provide the metadata details).
Open the browser and enter the copied end point from previous step. The Endpoint will display the details below.
Copy the details under Endpoint URL.
Open SOAP UI and copy the Endpoint URL.
Select the method as POST and enter the details of the item to be created in the Request section.
Submit the request and the item will be created successfully in Oracle ERP Cloud.
The details of the item created in Oracle ERP Cloud are as shown below.
Oracle Fusion ERP Cloud provides numerous Web / REST Services for integration and with each release Oracle is adding more and more services. I have come across scenarios where you have a Web Service available for integration but don't have the equivalent REST Service available.
This might be a problem when you are developing custom applications in VBCS as VBCS can only work with REST Services at this point of time. To overcome this problem, we can leverage Integration Cloud and expose the Web Service as REST API.
In this post I will provide details around how to expose Web Services as REST API using OIC.
Create a REST Connector and Configure the Connection / Security details.
Create an Oracle ERP Cloud adapter and Configure the Connection / Security details.
Create a new Integration and Select Basic Routing Style.
Enter the relevant integration details after selecting the style (Integration Name, Identifier, Description and Package Details)
Select the REST Connector and drop it on the Trigger Section and Enter the details as shown below.
Click on next to configure the Request details of the service.
I have used the below JSON data to configure request.
{ "OrganizationCode" : "XX", "ItemClass" : "Root Item Class", "ItemNumber" : "Test Demo Item - 001", "ItemDescription" : "Test Demo Item - 001", "ItemStatusValue" : "Active", "LifecyclePhaseValue" : "Production", "PrimaryUOMValue" : "Each" }
Click on Next to configure the Response details.
I have used the below JSON data for configuring the response.
{ "ItemId" : 999994000402981, "OrganizationId" : 111, "OrganizationCode" : "XX", "ItemCatalogGroupId" : 100000011369001, "ItemClass" : "Root Item Class",
..................}
Now select the Oracle ERP Cloud adapter and drop it in the Invoke section and add the details as shown below.
Now add the mapping for request (mapping data between REST and ERP Cloud connector) and response (mapping data from ERP Cloud to REST Connector) as shown below.
Add the business identifier details for tracking.
Save the changes and activate the application.
Copy the Endpoint details as shown below (this endpoint will provide the metadata details).
Open the browser and enter the copied end point from previous step. The Endpoint will display the details below.
Copy the details under Endpoint URL.
Open SOAP UI and copy the Endpoint URL.
Select the method as POST and enter the details of the item to be created in the Request section.
Submit the request and the item will be created successfully in Oracle ERP Cloud.
The details of the item created in Oracle ERP Cloud are as shown below.