Friday, October 9, 2026

OIC - Update JSON Content Dynamically Using REST Adapter

Introduction

In Oracle Integration Cloud (OIC), JSON request and response payloads may change dynamically when new fields are added. The REST Adapter's Allow Dynamic Json feature helps process additional JSON elements that are not defined in the original sample schema.

This feature supports for:

  1. Trigger Request
  2. Invoke Response

2. Use Case

Suppose an API initially returns:

{
  "Val1": "v1"
}

Later, it returns additional fields:

{
  "Val2": true
}

We need to process these new fields without depending entirely on the original JSON schema.

3. Implementation Steps

  1. Open the REST Adapter configuration for the trigger or invoke.
  2. Select JSON as the payload format and enable Allow Dynamic Json.
  3. Configure the initial JSON sample and complete the adapter setup.
  4. Open the mapper and map the standard fields using the graphical mapper.
  5. For additional fields, update the mapper's XSLT code to extract the required elements dynamically.

Example XSLT:

<xsl:value-of
  select="*[local-name()='test2']"/>

Adjust the XPath to match the actual response wrapper and namespace structure in your mapper.

POC screenshots:






4. Benefits

  • Supports additional JSON fields at runtime.
  • Reduces dependence on the original JSON sample schema.
  • Provides flexibility when API payloads change.

5. Reference

https://docs.oracle.com/en/cloud/paas/application-integration/rest-adapter/using-dynamic-json-content-invoke-connection-response-payloads.html

Thursday, October 8, 2026

OIC - How to Download a Used Schema from an OIC Integration

Introduction

While working on an Oracle Integration (OIC) integration, there may be situations where we need to retrieve the XSD schema that is already being used by an adapter or action.

Instead of creating the schema again, OIC provides an easy way to view and copy the schema directly from the integration configuration.

Use Case

Suppose an existing OIC integration is using an XSD through an adapter or an action, and we need the same schema for:

  • Reference or documentation
  • Creating another integration
  • Troubleshooting
  • Mapping or validation
  • Reusing the schema in another integration

Solution

We can retrieve the schema directly from the Adapter Configuration – Summary page.

Steps

Step 1: Open the OIC Integration

Open the required integration and click Edit.

Step 2: Open the required Adapter/Action

Navigate to the adapter or action where the schema is being used.

For example:

  • REST Adapter
  • SOAP Adapter
  • Stage File action
  • Other actions where an XSD/schema is configured

Step 3: Navigate to the last configuration page

Complete/navigate through the adapter configuration until you reach the Summary page.

Step 4: Open the Schema field

On the Summary page, locate the Schema field.

Click on the schema name/field.

OIC opens a pop-up displaying the XSD content used by that configuration.

Step 5: Copy the XSD

From the pop-up, select and copy the complete XSD code.

You can then save it as an .xsd file or reuse the schema wherever required.


Example

For a Stage File action, navigate to the schema configuration and proceed to the final Summary page.

Click the Schema field.

OIC displays the XSD definition in a pop-up window.

Simply copy the complete XSD content and save it as:

Employee.xsd

Key Point

You do not need to recreate or upload the schema just to obtain the XSD being used by an existing OIC configuration.

Adapter/Action → Configuration → Summary → Schema → View XSD → Copy

Conclusion

This is a simple way to recover or reuse an XSD that is already configured in an OIC integration, especially when the original schema file is no longer available.

Wednesday, October 7, 2026

ERP- Generate PGP Key Pair in Oracle Fusion Using Advanced Create

Introduction

In Oracle Fusion, a PGP key pair can be generated from Manage Transmission Configuration using the Advanced Create option.

The generated key pair consists of:

  • Private Key – securely maintained in Oracle Fusion.
  • Public Key – generated by Fusion and made available in UCM.

The public key can be downloaded from UCM and subsequently used in Oracle Integration Cloud (OIC) for PGP-based encryption or other applicable security requirements.

This blog explains the complete process using Advanced Create.

Use Case

The objective is to generate a PGP key pair in Oracle Fusion and make the public key available in OIC.

High-Level Flow

Oracle Fusion

     |

Manage Transmission Configuration

     |

Advanced Create

     |

Generate PGP Key pair( private & Public)                   |   

Export to UCM

     |

 Download  keys to use in oic.

                         

Step 1: Go to Manage Transmission Configurations

Log in to the Oracle Fusion application >> Navigate to My Enterprise >> Setup and Maintenance >> Search >> Search with Manage Transmission Configurations >> click to open Manage Transmission Configuration




Step 2: Create PGP Key pair.

Select "Secure File Transfer protocol for static file names >> add a configuration name >> Provide PGP Private key password >>click on the dropdown list for PGP private Signing Key field >> select Advanced create option >>Select the PGP Key attributes as per required.

A typical configuration can include:

Key Type       : RSA

Key Size       : 2048 / 3072 / 4096

Expiration Date   : As per project requirement

Encryption Algorithm     : AES128/AES192/AES256

Hash Algorithm : SHA256/SHA384

Compression    : BZIP2/ZIP/ZLIB






Step 3: Export the PGP key pair.



Step4: Download keys from UCM

Go to fusion UCM : https://<fusion hostname>/cs > search with key name prefix and click actions >> info > click to download the file.




Step 5: Configure the Public Key in OIC

The downloaded Fusion public key can now be configured in OIC according to the integration requirement.


Public Key vs Private Key

Understanding the purpose of each key is important.

Public Key : The public key can be distributed to the system that needs to encrypt information for the private-key owner.

Private Key: The private key must be protected and should not be distributed unnecessarily.

It is used for operations such as:

  • Decryption
  • Digital signing

Conclusion

Using Advanced Create in Oracle Fusion's Manage Transmission Configuration provides a controlled way to generate a PGP key pair with the required cryptographic parameters.


Wednesday, September 30, 2026

OIC Blog: Creating Unique Account IDs Using XPath | Use of distinct-values()

Introduction

In Oracle Integration Cloud (OIC), sometimes the source contains multiple Impacted Account IDs, and the same Account ID may appear more than once.

This XPath helps to:

  • Collect all Account IDs
  • Convert them into a delimited string
  • Convert them back into nodes
  • Remove duplicate values using distinct-values()
  • Create a unique list for the target Accounts field

XPath Used

distinct-values(

  oraext:create-nodeset-from-delimited-string(

    "dvs",

    oraext:create-delimited-string(

      /nssrcmproexecute/ns15:request-wrapper/ns15:ImpactedAccountID,

      ","

    )

  )

)

How It Works

1. create-delimited-string()

oraext:create-delimited-string(

  /nssrcmproexecute/ns15:request-wrapper/ns15:ImpactedAccountID,

  ","

)

This takes multiple ImpactedAccountID values and combines them using a comma.

Input:

1001

1002

1001

1003

Result:

1001,1002,1001,1003

2. create-nodeset-from-delimited-string()

oraext:create-nodeset-from-delimited-string(

  "dvs",

  "1001,1002,1001,1003"

)

This converts the comma-separated values back into individual nodes.

3. distinct-values()

distinct-values(...)

This removes duplicate values.

Result:

1001

1002

1003

Example

Source

<ImpactedAccountID>1001</ImpactedAccountID>

<ImpactedAccountID>1002</ImpactedAccountID>

<ImpactedAccountID>1001</ImpactedAccountID>

<ImpactedAccountID>1003</ImpactedAccountID>

Target

<Accounts>

   <AccountId>1001</AccountId>

   <AccountId>1002</AccountId>

   <AccountId>1003</AccountId>

</Accounts>


Why Use This XPath?

This approach is useful when the target requires unique repeating Account IDs and the source may contain duplicate values.

In Simple Words

Source → Combine IDs → Split them again → Remove duplicates → Map unique IDs to target

This is especially useful in OIC when handling repeating elements and avoiding duplicate records in the target request.

Monday, September 28, 2026

OIC: Extract File Name from File Path Using replace() and Regular Expression

Introduction

In Oracle Integration Cloud (OIC), there are situations where an API returns a list of files along with their complete directory paths.

For example:

/archive/inbound/file1.csv,

/archive/inbound/file2.csv,

/archive/outbound/file3.csv

If we only need the file names and want to remove the directory path, we can use the OIC replace() function with a regular expression.

The expression used in this use case is:

replace( oraext:create-delimited-string($Var_FinalFileList/nsmpr2:executeResponse/ns29:response-wrapper/ns29:objects/ns29:name, "," ),"[^,]*/","")

Use Case

Suppose an OIC REST/API response returns multiple file names with their complete paths.

Input

/archive/inbound/File_001.csv,

/archive/inbound/File_002.csv,

/archive/outbound/File_003.csv

We want to remove the directory path and get:

File_001.csv,File_002.csv,File_003.csv

This can be achieved using replace().

Solution

The main expression is:

replace(

  oraext:create-delimited-string(

    $Var_FinalFileList/nsmpr2:executeResponse/ns29:response-wrapper/ns29:objects/ns29:name,

    ","

  ),

  "[^,]*/",

  ""

)

Let's break it into two parts.

Step 1: Create a Comma-Separated String

First, we use:

oraext:create-delimited-string($Var_FinalFileList/nsmpr2:executeResponse/ns29:response-wrapper/ns29:objects/ns29:name, ",")

The XPath:

$Var_FinalFileList/nsmpr2:executeResponse/ns29:response-wrapper/ns29:objects/ns29:name

retrieves the file names/paths from the response.

oraext:create-delimited-string() combines multiple values into a single string using the specified delimiter.

Here the delimiter is: ,

Example

If the response contains:

/archive/inbound/File_001.csv

/archive/inbound/File_002.csv

/archive/outbound/File_003.csv

the function creates:

/archive/inbound/File_001.csv,/archive/inbound/File_002.csv,/archive/outbound/File_003.csv

Step 2: Use replace() to Remove the Path

Now we apply:

replace(

   <comma-separated-string>,

   "[^,]*/",

   ""

)

The important part is the regular expression:

[^,]*/

What does it mean?

[^,] :Any character except comma

*: Zero or more occurrences

/: Forward slash

Therefore:

[^,]*/

matches the directory/path portion before the file name, while stopping at the comma separating the next value.

Example

Input:

/archive/inbound/File_001.csv

The matched portion is:

/archive/inbound/

After replacing it with an empty string:

File_001.csv

Complete Example

Input

/archive/inbound/File_001.csv,

/archive/inbound/File_002.csv,

/archive/outbound/File_003.csv

Output

File_001.csv,File_002.csv,File_003.csv

In simple terms

First convert all file-path values into one comma-separated string, then use replace() with a regular expression to remove everything up to the last / for each comma-separated value, leaving only the file names.

This is a simple and useful OIC XPath/XSLT expression technique when working with API responses containing multiple file paths.

OIC SFTP: Generate SSH Private/Public Key Pair for WinSCP Access

Introduction

When we need to access an OIC SFTP endpoint from WinSCP using SSH key-based authentication, we need to generate an SSH key pair.

The key pair consists of:

Private Key – stored securely on the client/WinSCP machine.

Public Key – provided/configured on the SFTP side for the respective user.

WinSCP – uses the private key during SFTP authentication.

OIC SFTP – uses the corresponding public key to authenticate the client.

There are two commonly used approaches to generate the SSH key pair:

  1. Windows Command Prompt using ssh-keygen
  2. PuTTYgen

1. Architecture / High-Level Flow

Flow

             KEY GENERATION

                   |

        +----------+----------+

        |                     |

   ssh-keygen              PuTTYgen

   Command Prompt          Windows GUI

        |                     |

        +----------+----------+

                   |

             SSH Key Pair

          +--------+--------+

          |                 |

     Private Key        Public Key

          |                 |

          |                 +----> Configure on

          |                       SFTP/OIC side

          |

          +----> Configure in WinSCP

                         |

                         |

                  SFTP over SSH

                         |

                         v

                  OIC SFTP Endpoint

Important: The private key must be kept secure and should never be shared with the SFTP server or other unauthorized users.

Option 1 – Generate SSH Key Using ssh-keygen

Windows provides the OpenSSH ssh-keygen utility, which can be used from Command Prompt.

Step 1: Open Command Prompt

Open Command Prompt and execute:

ssh-keygen -t rsa -b 2048 -m pem

What does the command mean?

ssh-keygen

   |

   +-- -t rsa       → RSA key type

   |

   +-- -b 2048      → 2048-bit key

   |

   +-- -m pem       → PEM output format

Step 2: Specify the Key File Name

The command will prompt:

Enter file in which to save the key

(C:\Users\<username>/.ssh/id_rsa):

Provide the required location and filename.

For example:

C:\Users\<username>\OneDrive - abc\John\TRN_John_OICSFTP_Key

If the file already exists, you may see:

... already exists.

Overwrite (y/n)?

Enter: y

only if you intentionally want to replace the existing key.

3. Enter the Passphrase

Next, the command prompts:

Enter passphrase (empty for no passphrase):

and: Enter same passphrase again:

You can configure a passphrase for additional protection.

However, before using the key with an automated integration/client, verify whether the target OIC SFTP/WinSCP configuration supports the selected private-key/passphrase setup.

4. Generated Files

After successful execution, two files are generated.

For example:

TRN_John_OICSFTP_Key

TRN_John_OICSFTP_Key.pub

Private Key

TRN_John_OICSFTP_Key

This is the private key.

It should be stored securely.

Public Key

TRN_John_OICSFTP_Key.pub

This is the public key that can be provided to the SFTP server/OIC-side user configuration.


Option 2 – Generate Key Using PuTTYgen

Another option is to use PuTTY Key Generator (PuTTYgen).

This is particularly useful when the Windows environment already uses PuTTY/WinSCP.

Step 1: Open PuTTYgen

Launch:

PuTTY Key Generator

Step 2: Select RSA

Under the key type, select:

RSA

Set the key size to:

2048 bits

Step 3: Generate

Click:

Generate

Move the mouse around the blank area until the key is generated.

Step4: Save the Private Key

Click:

Save private key

Save the file securely.

For example:

TRN_John_OICSFTP_Key.ppk

The .ppk file is the PuTTY/WinSCP private-key format.

Step5: Obtain the Public Key

PuTTYgen displays the public key in the section:

Public key for pasting into OpenSSH authorized_keys file

Copy the complete public-key text.

This public key is then configured/provided on the SFTP side according to the server/OIC SFTP configuration.

Step6: Using the Key in WinSCP

Once the key pair is generated, configure WinSCP.

WinSCP Configuration

Go to:

WinSCP

   ↓

New Site

   ↓

File Protocol: SFTP

   ↓

Host Name

   ↓

Port: 22

   ↓

User Name

Then go to:

Advanced

   ↓

SSH

   ↓

Authentication

Select the corresponding private key.

For PuTTYgen-generated keys, this will normally be the:

.ppk

file.

For OpenSSH keys, use the appropriate private-key format supported by your WinSCP version.

Step7: Authentication Flow

During the connection, WinSCP uses the private key for authentication.

Conceptually:

                 WinSCP

                   |

                   | Private Key

                   |

                   v

             SSH Authentication

                   |

                   v

             OIC SFTP Endpoint

                   |

                   | Validates against

                   | Public Key

                   v

             Authentication

                Successful

                   |

                   v

              SFTP Session

Conclusion

For OIC SFTP access through WinSCP, we can generate the SSH key pair either through Windows ssh-keygen or PuTTYgen.

Recommended practice: Keep the private key protected and share only the public key with the SFTP/OIC administrator.

Tuesday, September 15, 2026

OIC - Split Semicolon-Separated Values Using tokenize() in XSLT

Introduction

While developing integrations in Oracle Integration Cloud (OIC), we may receive a field containing multiple values separated by a delimiter such as a semicolon (;).

For example:

"ImpactedAccountID": [

  "5354181000",

  "7789253000;4889253000",

  "6823624000",

  "9235902000",

  "5091223000",

  "2279450000;3457280000;7236081000;7131391000",

  "7131391000",

  "7131391000",

  "3457280000",

  "5200100000"

]

In this scenario, simply looping through ImpactedAccountID will not split values such as:

7789253000;4889253000

into separate account IDs.

OIC XSLT provides the tokenize() function, which can be used to split a string based on a delimiter.

Use Case

We receive an incident payload containing an ImpactedAccountID array.

Some array elements contain a single account ID, while others contain multiple account IDs separated by semicolon (;).

Input

{

  "VoltageDipIncidentDate": "09-07-2026",

  "VoltageDipIncidentTime": "15:14",

  "IncidentID": "INC 1350000262",

  "ImpactedAccountID": [

    "5354181000",

    "7789253000;4889253000",

    "6823624000",

    "9235902000",

    "5091223000",

    "2279450000;3457280000;7236081000;7131391000",

    "7131391000",

    "7131391000",

    "3457280000",

    "5200100000",

    "5173284000",

    "4523013000",

    "3506184000",

    "4136450000",

    "3264642000"

  ]

}

Our requirement is to transform this into multiple individual accountId elements.

Solution

We can use the XSLT tokenize() function.

The basic syntax is:

tokenize(string, delimiter)

For our requirement:

tokenize(string(.), ';')

This tells XSLT: Take the current value and split it wherever a semicolon (;) is found.

XSLT Code

The following is the same logic used in the provided XSLT:

<xsl:for-each

    select="/nssrcmpr:execute/ns15:request-wrapper/ns15:ImpactedAccountID">

    <xsl:for-each select="tokenize(string(.), ';')">

        <ns23:accounts>

            <ns23:accountId>

                <xsl:value-of select="normalize-space(.)"/>

            </ns23:accountId>

        </ns23:accounts>

    </xsl:for-each>

</xsl:for-each>



How the Logic Works

There are two xsl:for-each loops.

1. Outer for-each

<xsl:for-each

    select="/nssrcmpr:execute/ns15:request-wrapper/ns15:ImpactedAccountID">

The outer loop iterates through every element of the ImpactedAccountID array.

For example, it receives values one by one:

5354181000

7789253000;4889253000

6823624000

9235902000

...

2. tokenize() splits the current value

Inside the outer loop:

<xsl:for-each select="tokenize(string(.), ';')">

Here: string(.) -- gets the current value.

The second parameter: ';' --defines the delimiter.

For example:

7789253000;4889253000

becomes:

7789253000

4889253000

Similarly:

2279450000;3457280000;7236081000;7131391000

becomes four separate values:

2279450000

3457280000

7236081000

7131391000

3. Create the Target Element

For every token, we create:

<ns23:accounts>

    <ns23:accountId>

        <xsl:value-of select="normalize-space(.)"/>

    </ns23:accountId>

</ns23:accounts>

The current token is represented by: .

Therefore:

<xsl:value-of select="normalize-space(.)"/>

writes the current account ID into accountId.

normalize-space() is useful to remove unnecessary leading/trailing whitespace.

Example

Suppose the input contains:

"ImpactedAccountID": [

    "5354181000",

    "7789253000;4889253000",

    "6823624000"

]

Processing

First iteration:

5354181000

tokenize() returns:

5354181000

Second iteration:

7789253000;4889253000

tokenize() returns:

7789253000

4889253000

Third iteration:

6823624000

returns:

6823624000

Output

The resulting XML will contain individual accountId values:

<ns23:accounts>    <ns23:accountId>5354181000</ns23:accountId>

</ns23:accounts>

<ns23:accounts>   <ns23:accountId>7789253000</ns23:accountId>

</ns23:accounts>

<ns23:accounts>    <ns23:accountId>4889253000</ns23:accountId>

</ns23:accounts>

<ns23:accounts>   <ns23:accountId>6823624000</ns23:accountId>

</ns23:accounts>

Output for the Provided Sample

For the provided input, values such as:

7789253000;4889253000

are converted to:

<ns23:accounts>   <ns23:accountId>7789253000</ns23:accountId>

</ns23:accounts>

<ns23:accounts>   <ns23:accountId>4889253000</ns23:accountId>

</ns23:accounts>

And:

2279450000;3457280000;7236081000;7131391000

becomes:

<ns23:accounts>  <ns23:accountId>2279450000</ns23:accountId>

</ns23:accounts>

<ns23:accounts>   <ns23:accountId>3457280000</ns23:accountId>

</ns23:accounts>

<ns23:accounts>   <ns23:accountId>7236081000</ns23:accountId>

</ns23:accounts>

<ns23:accounts>  <ns23:accountId>7131391000</ns23:accountId>

</ns23:accounts>

Complete Logic in Simple Terms

The complete processing can be understood as:

ImpactedAccountID array

        ↓

Outer for-each

        ↓

Pick one value

        ↓

Check/Split using tokenize()

        ↓

Delimiter = ;

        ↓

Create accountId for every token

        ↓

normalize-space()

        ↓

Final XML

Key XSLT statement

tokenize(string(.), ';')

means: Split the current string wherever ; occurs and process each resulting value separately.

Conclusion

The tokenize() function is very useful in OIC when an incoming field contains delimiter-separated values.

Instead of manually manipulating the string, we can use:

<xsl:for-each select="tokenize(string(.), ';')">

This approach allows OIC to handle both:

5354181000

and:

7789253000;4889253000

using the same XSLT logic.

Important: The outer for-each handles the original ImpactedAccountID array, while the inner for-each handles the individual values produced by tokenize().

Featured Post

OIC - Update JSON Content Dynamically Using REST Adapter

Introduction In Oracle Integration Cloud (OIC), JSON request and response payloads may change dynamically when new fields are added. The RE...