Monday, February 14, 2022

OIC - Read Json data received as json string

Steps:

  • Write Received Json string to stage directory as binary content using stage action oraext:encodeBase64() function and an opaque schema.
  • Read data written in the stage directory using stage read action and sample json file as reference.
  • Map the read json to response of the integration.
Rest configure input and output:

Input xsd:
<?xml version="1.0" encoding="windows-1252"?>
<Input xmlns="www.oracle.com"/testing">
<JsonDataInString></JsonDataInString>
</Input>

Output json:
{
"Id":"",
"Name":""
}
Opaque xsd to write in stage binary:

<?xml version = '1.0' encoding = 'UTF-8'?>  
<schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
            xmlns="http://www.w3.org/2001/XMLSchema" >
<element name="opaqueElement" type="base64Binary" />
</schema>

Steps with POC screenshots:
























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...