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":""
}
Provide json sample as response payload.
{
"Result":""
}
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.
Thus we added 2 operations, we can add more (max 11) operations as required.
Next.
We can see the operation flows added.
Do the Mappings for the addtion and subtraction operations .
Add the tracking from trigger >> more
Thus, we can achieve the multiple resources or verbs on the rest adapters.
No comments:
Post a Comment