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

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