Thursday, June 15, 2023

OIC - Upload attachment in REST API Oracle Integration Cloud

UseCase: We will upload a CSV file as attachment to REST API and then parse the CSV file and send back the contents as json back to the consumer.

Highlevel steps:

  • Configure a rest trigger with POST verb and select request as multipart with payload options and response as a json payload
  • Take a stage and write the file into stage using opaque schema and encodeReferenceToBase64() function.
  • Take another stage and read the file using sample deilimited doc.
  • Map the read contents to rest response.

Json response payload:

[{

"FirstName":"",

"LastName":"",

"Designation":""

}]

For opaque schema:

https://soalicious.blogspot.com/2022/02/xsd-opaque-schema.html


Detailed implementation steps: 

Integration flow:


Steps:


















No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...