Tuesday, November 29, 2022

OIC - Use REST adapter with multiple resources or Multiple Verbs in Oracle Integration Cloud

Here, we will see how to use REST adapter with multiple resources and verbs support in Oracle Integration Cloud(OIC).

Usecase: We will create a calculator service with 2 resource operations addition and subtraction with rest adapter multi resources or verbs support. In this case, we have used same verb as post with 2 different resource operations.

Detailed steps:

Choose App driven Orchestration integration style.


Provide integration name, package >> Create.


We see empty canvas, Drop a rest adapter.


Provide endpoint name and select to configure multiple resources or verbs.(max11).


1st creating for addition operation.
Provide operation name, resouce uri: /addition, verb : post, and request and response payloads.


Provide json sample as request payload.


{
"Number1":"",
"Number2":""
}


Next


Provide json sample as response payload.


{
"Result":""
}


Next


Thus, we added 1st addition operation.
Select Add another operation box and go next


Add next operation : subtract.


Provide json sample for request payload.




Provide json sample for response payload.



Next


Thus we added 2 operations, we can add more (max 11) operations as required.

Next.


Done


We can see the operation flows added.


Do the Mappings for the addtion and subtraction operations .





Add the tracking from trigger >> more 





Save >> Activate >> Test




Thus, we can achieve the multiple resources or verbs on the rest adapters.


No comments:

Post a Comment

Featured Post

OIC - how can I use XSLT functions to remove leading zeros from numeric and alphanumeric fields?

To remove leading zeros from an numeric field in Oracle Integration Cloud (OIC) using XSLT, you can Use number() Function The number() funct...