Friday, May 30, 2025

OIC - Grouping Payment Data with XSLT: Using for-each-group to Transform Headers and Details in Oracle EBS

🔷 Use Case

In Oracle EBS payment integrations, incoming data files often contain repeating header-detail structures. A typical scenario includes File Headers (MH), Batch Headers (RH), and Detail Records (D1).

The requirement is to extract the POS ID value from each batch header (RH) and include it in each of the detail records (D1) for the target file.

Source file:

MHHEADER Record

RHHEADER Record posid1

D1DETAIL Record 1.1

D1DETAIL Record 1.2

D1DETAIL Record 1.3

RHHEADER Record posid2

D1DETAIL Record 2.1

D1DETAIL Record 2.2

...

The target file should follow the format:

Header  
Detail posid1 
Detail posid1
Detail posid1  
Header  
Detail posid2  
Detail posid2 
...

🔷 Solution Overview

To achieve this, we utilize XSLT to:
✅ Identify and group records by batch header (RH).
✅ Extract the POS ID from each RH record.
✅ Write one Header record to the target for each RH.
✅ Write corresponding Detail records, including the extracted POS ID, for each D1 under the RH.
✅ Repeat for all batches in the file.


🔷 Solution Steps

1️⃣ Identify the Grouping
Use <xsl:for-each-group> with group-starting-with="RH" to create logical batches.

2️⃣ Extract POS ID from Batch Header
Within each group, identify the RH record and extract the POS ID using XSLT’s substring and normalize-space functions.

3️⃣ Write Header Record
For each group, create a target Header record.

4️⃣ Iterate Over Detail Records
Loop through the Detail (D1) records within the group and create target Detail records. Insert the extracted POS ID value into each of these records.

5️⃣ Output to Target XML
The XSLT’s template writes the Header and Detail records in the specified order for the target file.


🔷 Source XSLT Snippet

<xsl:for-each-group select="..." group-starting-with="...">
  <!-- Extract RH's POS ID -->
  <xsl:variable name="POSID" select="substring(RH, ... , ... )"/>
  <!-- Write Header record -->
  <Header>
    <POSID><xsl:value-of select="$POSID"/></POSID>
  </Header>
  <!-- Write all Detail records under RH -->
  <xsl:for-each select="current-group()[...D1...]">
    <Detail>
      <POSID><xsl:value-of select="$POSID"/></POSID>
      ...
    </Detail>
  </xsl:for-each>
</xsl:for-each-group>
Actual code:
<xsl:template match="/">
  <ns0:empmpr:Write xmlns:ns0="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.bpel.services.XSLTProcessor.BPEL2XSLT">
    <ns24:Payments xmlns:ns24="http://xmlns.oracle.com/apps/financials/payables/payments/shared/paymentsmodel/paymentsservice/">
      <ns24:Payment>
        <ns24:HDR_RECORD-RECORD>
          <ns24:VALUE-OF xml:id="id_248" select="'HDR'"/>
          <ns24:value-of xml:id="id_249" select="'HDR'"/>
        </ns24:HDR_RECORD-RECORD>
        <ns24:CUST_VENDOR_ID xml:id="id_277">
          <ns24:value-of xml:id="id_278" select="'PSB'"/>
        </ns24:CUST_VENDOR_ID>
        <ns24:CURR_CD_PAY_MODE xml:id="id_252">
          <ns24:value-of xml:id="id_253" select="'HKD'"/>
        </ns24:CURR_CD_PAY_MODE>
        <ns24:PIT_EFF_PAY_SOURCE xml:id="id_254">
          <ns24:value-of xml:id="id_255" select="'PPSB'"/>
        </ns24:PIT_EFF_PAY_SOURCE>
        <ns24:PAY_SOURCE_ACCT_NO xml:id="id_256">
          <ns24:value-of xml:id="id_257" select="'PPSB'"/>
        </ns24:PAY_SOURCE_ACCT_NO>
      </ns24:Payment>
    </ns24:Payments>

    <xsl:for-each-group select="$ReadRawFile/nsmp0:ReadResponse/ns23:FileRowSet/ns23:FileRow" 
group-starting-with="ns23:FileRow[starts-with(normalize-space(ns23:MyData), 'RH')]">
      <xsl:if test="starts-with(normalize-space(current-group()[1]/ns23:MyData), 'RH')">
        <xsl:variable name="hvalue" select="normalize-space(current-group()[1]/ns23:MyData)"/>
        <xsl:for-each select="current-group()[position() &gt; 1][starts-with(normalize-space(ns23:MyData), 'D1')]">
          <ns24:Payment xml:id="id_42">
            <ns24:HDR_RECORD-RECORD>
              <ns24:VALUE-OF xml:id="id_248" select="'DTR'"/>
              <ns24:value-of xml:id="id_249" select="'DTR'"/>
            </ns24:HDR_RECORD-RECORD>
            <ns24:CUST_VENDOR_ID xml:id="id_277">
              <ns24:value-of xml:id="id_278" select="normalize-space(substring(ns23:MyData, 28, 25))"/>
            </ns24:CUST_VENDOR_ID>
            <ns24:CURR_CD_PAY_MODE xml:id="id_252">
              <ns24:value-of xml:id="id_253" select="'CASH'"/>
            </ns24:CURR_CD_PAY_MODE>
            <ns24:PIT_EFF_PAY_SOURCE xml:id="id_254">
              <ns24:value-of xml:id="id_255" select="'PPSB'"/>
            </ns24:PIT_EFF_PAY_SOURCE>
            <ns24:PAY_SOURCE_ACCT_NO xml:id="id_256">
              <ns24:value-of xml:id="id_257" select="'PPSB'"/>
            </ns24:PAY_SOURCE_ACCT_NO>
            <ns24:PAY_AMT xml:id="id_258">
              <ns24:value-of xml:id="id_259" select="normalize-space(substring(ns23:MyData, 28, 25))"/>
            </ns24:PAY_AMT>
            <ns24:PAY_DATE xml:id="id_260">
              <ns24:value-of xml:id="id_261" select="normalize-space(substring(ns23:MyData, 20, 8))"/>
            </ns24:PAY_DATE>
            <ns24:POSID xml:id="id_262">
              <ns24:value-of xml:id="id_263" select="normalize-space(substring(ns23:MyData, 55, 8))"/>
            </ns24:POSID>
            <ns24:INPUT_TIME xml:id="id_264">
              <ns24:value-of xml:id="id_265" select="normalize-space(substring(ns23:MyData, 11, 15))"/>
            </ns24:INPUT_TIME>
          </ns24:Payment>
        </xsl:for-each>
      </xsl:if>
    </xsl:for-each-group>
  </ns0:empmpr:Write>
</xsl:template>

Screenshot:


🔷 Step-by-Step Breakdown

✅ Step 1: Start the Template

<xsl:template match="/">

This is the root template—processing begins here.

✅ Step 2: Write Static Header Payment Record

<ns24:Payments>

  <ns24:Payment>...</ns24:Payment>

</ns24:Payments>

This block writes a static Payment record containing hard-coded values. It seems to serve as a placeholder or “file-level header.”

✅ Step 3: Group Records by Batch Header (RH)

<xsl:for-each-group select="..." group-starting-with="...RH...">

This groups all input file rows into batches starting with a RH record (Batch Header).

✅ Step 4: Validate the Group

<xsl:if test="starts-with(normalize-space(current-group()[1]/ns23:MyData), 'RH')">

Ensures the first row in the group is indeed an RH record.

✅ Step 5: Extract Batch Header Data

<xsl:variable name="hvalue" select="normalize-space(current-group()[1]/ns23:MyData)"/>

This stores the RH record’s data for use in Detail record mapping.

✅ Step 6: Process Each Detail Record (D1) in the Group

<xsl:for-each select="current-group()[position() &gt; 1][starts-with(normalize-space(ns23:MyData), 'D1')]">

Loops through all D1 rows after the first row in the group (which is the RH record). Each D1 record triggers the creation of a new Payment record.

✅ Step 7: Write Detail Payment Record

Inside the for-each, it writes a Payment XML element for each D1 record, extracting and transforming parts of the data:

Extracts substrings from MyData to populate fields like:

CUST_VENDOR_ID

PAY_AMT

PAY_DATE

POSID

INPUT_TIME

Adds static values to fields like:

CURR_CD_PAY_MODE (CASH)

PIT_EFF_PAY_SOURCE (PPSB)

🔷 Conclusion

This XSLT approach automates the transformation from a mixed file structure to the target structured file by grouping, extracting POS IDs, and mapping the data efficiently. It ensures data consistency and proper file formatting for downstream processing.


Friday, May 23, 2025

OIC - Dynamic WSDL in OIC: Accept Any Payload with xsd:anyType

Dynamic WSDL in OIC: Accept Any Payload with xsd:anyType

Use Case

In OIC integrations, it's common to interact with multiple upstream or downstream systems where payload structures differ or aren't fixed. Instead of creating a unique integration for every structure, we can expose a flexible web service that accepts any XML structure. This is especially helpful in hub-and-spoke or generic logging/auditing integrations.

The goal here is to expose a SOAP endpoint in OIC that accepts any type of payload.


Problem Statement

You want to expose an integration in OIC that:

  • Accepts varying or dynamic data structures from multiple sources.
  • Doesn't require a fixed schema.
  • Can act as a dynamic listener or dispatcher based on incoming payload content.

Solution: WSDL with xsd:anyType

Here is the exact WSDL used to expose a SOAP endpoint in OIC with flexible payload capability:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:tns="http://iec.ch/TC57/2011/schema/message"
             targetNamespace="http://iec.ch/TC57/2011/schema/message"
             name="CIMAsyncService">

    <!-- TYPES -->
    <types>
        <xsd:schema targetNamespace="http://iec.ch/TC57/2011/schema/message"
                    elementFormDefault="qualified">
            <xsd:element name="ResponseMessage" type="tns:ResponseMessageType"/>
            <xsd:complexType name="ResponseMessageType">
                <xsd:sequence>
                    <xsd:element name="Data" type="xsd:anyType"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:schema>
    </types>

    <!-- MESSAGE -->
    <message name="SendResponseMessageInput">
        <part name="parameters" element="tns:ResponseMessage"/>
    </message>

    <!-- PORT TYPE -->
    <portType name="CIMAsynType">
        <operation name="SendResponseMessage">
            <input message="tns:SendResponseMessageInput"/>
        </operation>
    </portType>
</definitions>

How to Use in OIC

Step 1: Create a SOAP Connection

  • Go to Connections.
  • Choose connection type: SOAP.
  • Use the above WSDL file to configure the connection.
  • Set the security policies (None / Basic Auth / WSS, based on your use case).

Step 2: Create an Integration (App Driven - SOAP Trigger)

  • Choose the connection as the trigger.
  • OIC will auto-generate a structure where the input message will include:
    <Data> ... </Data>
    
  • Map this Data field directly or use oraext:getElement or xpath functions to extract values from it.

Step 3: Process the AnyType Content

  • Inside the integration flow, use an Assign or Function Call to extract specific XML elements.
  • Alternatively, just log or route the payload to another system without inspecting its structure.

Step 4: Activate and Test

  • Deploy and activate the integration.
  • Test with different XML structures using SOAP UI or Postman.

Example Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:mes="http://iec.ch/TC57/2011/schema/message">
   <soapenv:Header/>
   <soapenv:Body>
      <mes:ResponseMessage>
         <mes:Data>
            <Customer>
               <ID>123</ID>
               <Name>John Doe</Name>
            </Customer>
         </mes:Data>
      </mes:ResponseMessage>
   </soapenv:Body>
</soapenv:Envelope>

Benefits

  • No schema lock-in: Send anything from upstream systems.
  • Reusable: Use this as a generic endpoint for multiple use cases.
  • Powerful: Combine with Decision Models, JavaScript, or XSLT for routing or transformation.



Postman - How to Test a SOAP Service Using Postman

Use Case:

A QA engineer or developer needs to validate a legacy SOAP web service provided by an enterprise application. However, there is no UI available for direct interaction and using tools like SOAP UI feels heavy. They prefer a lightweight, quick alternative—Postman.

Solution Steps:

Step 1: Gather SOAP Endpoint and WSDL

Obtain the following from the service provider:

  • SOAP endpoint URL
  • WSDL (Web Services Description Language) URL or XML
  • Sample SOAP Request XML (if available)

Step 2: Open Postman

Launch Postman and open a new tab for a new request.

Step 3: Configure Request

  • Method: POST
  • URL: Enter the SOAP endpoint (e.g., https://example.com/soap/Service) and not the wsdl url(except ?wsdl part)
  • Headers:
    • Content-Type: text/xml;charset=UTF-8
    • SOAPAction: (Optional — required for some services. Use the action URL from WSDL.)

Step 4: Add the SOAP Envelope in the Body

  • Switch to the Body tab
  • Select raw
  • Choose XML (text/xml) from the dropdown
  • Paste your SOAP XML envelope. Example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservice.example.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:getUser>
         <web:userId>12345</web:userId>
      </web:getUser>
   </soapenv:Body>
</soapenv:Envelope>

Step 5: Send Request

Click Send. You’ll receive a SOAP XML response in the same format.

Step 6: Validate the Response

  • Check for the correct tags in the SOAP Body.
  • Look for fault tags (<soap:Fault>) to debug errors.



If authentication is required (Basic Auth, WS-Security), configure it under the Authorization tab or add headers manually.


How to Select a SOAP Operation in Postman

Step 1: Understand the WSDL File

Open the WSDL URL in a browser or download the XML. Look for the <wsdl:operation> tags. Each one represents an operation you can call.

Example:

<wsdl:operation name="getUser">
  ...
</wsdl:operation>

Step 2: Identify SOAPAction (Optional but often required)

Under each operation, the WSDL may define a soapAction attribute:

<operation name="getUser">
  <soap:operation soapAction="http://example.com/getUser"/>
</operation>

You’ll use this value in the SOAPAction header in Postman.

Step 3: Copy the Request XML for the Operation

Often, the WSDL (or service documentation) includes a sample request for each operation. If not, you can generate one based on the operation’s input schema.

Example SOAP request for getUser:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://example.com/webservice/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:getUser>
         <web:userId>12345</web:userId>
      </web:getUser>
   </soapenv:Body>
</soapenv:Envelope>

Step 4: Paste in Postman Body

Paste the envelope into Postman's body (as described earlier), and update the SOAPAction header (if required) with the operation’s SOAPAction URL.



Wednesday, May 21, 2025

OIC Gen3 - New feature - File Server Action in OIC 25.x

🔧 File Server Action in OIC 25.x

The File Server Action enables you to interact with the embedded File Server in OIC, facilitating operations such as listing directories, reading files, writing files, moving files, and deleting files. 

Supported Operations:

1. List Directory

Retrieves a list of files and subdirectories within a specified directory.

Note: Supports listing up to 1,000 files per operation. 


2. Get File Reference

Obtains a reference to a specific file, which can be used for further processing within the integration. 

3. Write File

Writes content to a specified file on the File Server.

Useful for creating new files or updating existing ones. 

4. Move File

Moves a file from one directory to another within the File Server.

Helps in organizing files post-processing. 

5. Delete File

Deletes a specified file from the File Server.

Useful for cleanup operations after processing.


 

🛠️ Implementing File Server Actions in an Integration

To utilize the File Server Action:

1. Enable File Server:

Ensure that the File Server is enabled in your OIC instance. 

2. Create or Edit an Integration:

In the integration canvas, click on the "+" icon to add a new action.

Select "File Server Action" from the list of available actions. 

3. Configure the Action:

Choose the desired operation (e.g., List Directory, Write File).

Provide necessary parameters such as directory paths, file names, and content as required by the operation. 

4. Map Inputs and Outputs:

Use the mapper to define how data flows into and out of the File Server Action. 

5. Test and Deploy:

Test the integration to ensure the File Server Action performs as expected.

Deploy the integration for production use. 

📘 Example Scenario: Processing Supplier Invoices

Objective: Automate the retrieval and storage of supplier invoices. 

Workflow:

1. List Directory:

Use the File Server Action to list all invoice files in the /invoices/pending directory. 

2. For Each File:

Get File Reference:

Obtain a reference to the current file.

Process File:

Read and process the file content as needed (e.g., extract data, validate).

Move File:

After successful processing, move the file to the /invoices/processed directory.

Delete File:

Optionally, delete the original file from the /invoices/pending directory to prevent reprocessing.

By leveraging the File Server Action in OIC 25.x, you can streamline file-based operations within your integrations, reducing the need for external tools and simplifying your workflows. 

File Server vs Ftp/sftp connection:

File Server (OIC 25.x) is lighter on message pack, faster, more secure, and ideal for internal automation.

SFTP Adapter is useful only when external connectivity is required, but comes with higher message consumption, slower performance, and more monitoring overhead.


OIC - Transforming anyType XML to a Namespaced Fragment using XSLT in Integration Flows | Dynamic XML Transformation: Namespace Remapping with xsl:apply-templates in XSLT

Use Case:

In enterprise integrations using Oracle Integration Cloud (OIC) or similar middleware, you may encounter services that accept or return XML fragments typed as xsd:anyType. These fragments can contain any structure, and the lack of a fixed schema or namespace binding makes it difficult to directly map elements in transformations.

For example, a source service might wrap business logic (like GetMeterReadings) inside a generic RequestMessage node with dynamic content. The requirement is to extract the GetMeterReadings fragment and pass it along to the target system with a well-defined target namespace.


Solution:

To handle this dynamic anyType payload, we use XSLT (Extensible Stylesheet Language Transformations) to:

  • Extract the desired fragment (GetMeterReadings) from the dynamic XML.
  • Reconstruct it in a known target namespace (myns1 in this case).
  • Maintain attribute and nested node integrity.

Here’s how it works:

1. Define a generic template to re-map all nodes into a target namespace:

<xsl:template match="*">
    <xsl:element name="myns1:{local-name()}">
        <xsl:apply-templates select="@* | node()"/>
    </xsl:element>
</xsl:template>

2. Apply the template only to the fragment of interest (GetMeterReadings) inside an anyType payload:

<xsl:apply-templates select="//inpl:RequestMessage/inpl:Request/*:GetMeterReadings"/>

3. Declare the required namespaces in the XSLT header:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:inpl="http://example.com/source"
                xmlns:myns1="http://example.com/target"
                exclude-result-prefixes="inpl"
                version="1.0">

Result:

The output of this transformation will be a GetMeterReadings element, moved into the myns1 namespace, ready to be used by the target system.

This approach ensures robust handling of anyType payloads in integrations and allows you to enforce consistent target schemas, even when the source is non-standard.




Monday, May 19, 2025

OIC - Handling any Type Field Mapping in Oracle Integration Cloud (OIC) | Use of Local-namespace() function and apply template

Usecase: 

While building an integration in OIC, you may come across a requirement where the target SOAP or XML structure contains a field of type <any> (or xs:anyType). These fields are placeholders meant to accept any valid XML content, but OIC’s Mapper UI doesn’t allow direct drag-and-drop mappings for such fields.

This can be confusing and frustrating, especially when you're trying to pass a dynamic XML or construct a custom payload. Here's how to deal with this in a clean and simple way.


Solution Steps

Step 1: Identify the <any> Field

In your target structure, locate the field labeled as <any> or marked with type xs:anyType.

Step 2: Switch to XSLT View

In the Mapper canvas:

  • Click on the </> icon (usually found in the upper right of the mapping panel).
  • This will open the raw XSLT mapping code.
Step 3: Manually Add a Custom XML Payload

Here, insert a valid XML snippet that the target system expects. Example:

<any>
  <ns1:CustomData xmlns:ns1="http://example.com/schema">
    <ns1:DeviceId>{/ns0:TriggerService/Request/GetMeterReadings/EndDevice}</ns1:DeviceId>
    <ns1:ReadingType>{/ns0:TriggerService/Request/GetMeterReadings/ReadingType}</ns1:ReadingType>
  </ns1:CustomData>
</any>

Replace /ns0:TriggerService/... with actual source path expressions from your input.

Step 4: Validate and Save
  • Ensure the XML syntax is correct.
  • Click Validate in the mapper toolbar.
  • Save your changes and return to the visual canvas.
Optional: Use JavaScript or Stage File for Complex Data

If the XML is very dynamic:

  • Use a JavaScript action to build the payload.
  • Or read it from a stage file and assign it as a single string/XML object.

Used code: we have used local-namespace() function and apply template

<xsl:param name="tracking_var_3" xml:id="id_21"/>
<xsl:template match="/" xml:id="id_11">
  <nstrgmpr:OutboundSOAPRequestDocument xml:id="id_12">
    <nstrgmpr:Body>
      <ns2:RequestMessage>
        <ns2:Header>
          <ns2:Verb>
            <xsl:value-of select="//*[local-name()='RequestMessage']//*[local-name()='Header']/*[local-name()='Verb']/text()"/>
          </ns2:Verb>
          <ns2:Noun>
            <xsl:value-of select="//*[local-name()='RequestMessage']//*[local-name()='Header']/*[local-name()='Noun']/text()"/>
          </ns2:Noun>
          <ns2:Timestamp>
            <xsl:value-of select="//*[local-name()='RequestMessage']//*[local-name()='Header']/*[local-name()='Timestamp']/text()"/>
          </ns2:Timestamp>
          <ns2:Source>
            <xsl:value-of select="//*[local-name()='RequestMessage']//*[local-name()='Header']/*[local-name()='Source']/text()"/>
          </ns2:Source>
          <ns2:ReplyAddress>
            <xsl:value-of select="//*[local-name()='RequestMessage']//*[local-name()='Header']/*[local-name()='ReplyAddress']/text()"/>
          </ns2:ReplyAddress>
          <ns2:MessageID>
            <xsl:value-of select="//*[local-name()='RequestMessage']//*[local-name()='Header']/*[local-name()='MessageID']/text()"/>
          </ns2:MessageID>
          <ns2:CorrelationID>
            <xsl:value-of select="//*[local-name()='RequestMessage']//*[local-name()='Header']/*[local-name()='CorrelationID']/text()"/>
          </ns2:CorrelationID>
        </ns2:Header>
        <ns2:Request>
          <xsl:apply-templates select="//*[local-name()='RequestMessage']"/>
        </ns2:Request>
      </ns2:RequestMessage>
    </nstrgmpr:Body>
  </nstrgmpr:OutboundSOAPRequestDocument>
</xsl:template>

<xsl:template match="//*[local-name()='RequestMessage']">
  <nsd10:GetMeterReadings>
    <xsl:for-each select="*[local-name()='Request']/*[local-name()='GetMeterReadings']/*[local-name()='EndDeviceAsset']">
      <nsd10:EndDevice>
        <nsd10:Names>
          <nsd10:name>
            <xsl:value-of select="*[local-name()='mRID']/text()"/>
          </nsd10:name>
        </nsd10:Names>
      </nsd10:EndDevice>
    </xsl:for-each>
    <xsl:for-each select="*[local-name()='Request']/*[local-name()='GetMeterReadings']/*[local-name()='ReadingType']">
      <nsd10:ReadingType>
        <xsl:value-of select="*[local-name()='name']/text()"/>
      </nsd10:ReadingType>
    </xsl:for-each>
  </nsd10:GetMeterReadings>
</xsl:template>
</xsl:stylesheet>

Screenshot:


Conclusion

Although <any> fields are not directly mappable in OIC’s graphical interface, you can still pass data to them using XSLT view and inserting well-formed XML manually. This gives you flexibility while still adhering to schema requirements.


Tuesday, May 13, 2025

OIC - Simulating External SOAP Service Calls in OIC Without Agent Using a Stub Integration

Use Case:

In Oracle Integration Cloud (OIC), we had a requirement to integrate with an external SOAP service that mandates an agent setup. However, due to agent issues during development, we needed a workaround to simulate the SOAP service response and continue functional testing. The goal was to create a stub service that mimics the real SOAP service, allowing us to test our main integration flow without dependency on the actual external system or agent setup.

Solution Steps:

  1. Create a Stub SOAP Connection:

    • Created a new SOAP connection in OIC without agent setup and basic authentication.
    • Uploaded the WSDL (with embedded XSD) of the external service to this connection.
    • Ensured that the connection is fully functional for internal calls.

  2. Develop a Stub Integration:

    • Built a separate OIC integration that uses the above SOAP connection as a trigger.
    • Hardcoded a sample SOAP response that mimics the external service's expected response.
    • This stub acts as a mock service and can be updated later with more realistic data if needed.


  3. Modify the Main Integration:

    • In the main integration (which originally called the external SOAP service), replaced the invoke to the external service with an invoke to the stub SOAP connection.
    • Used a dynamic approach to set Endpoint URL and SOAP Action in the invoke properties to point to the stub integration endpoint.

  4. Use a Lookup to Manage Endpoint Properties:

    • Created an OIC Lookup table to store environment-specific endpoint URLs and SOAP Actions.
    • This makes switching between the stub and real service (during SIT/UAT) seamless by just updating the lookup values.
  5. Mapping and Testing:

    • Mapped the request payload to match the expected structure of the original service.
    • Verified the response from the stub integration is structurally and functionally valid.
    • Ensured the integration behaves as if it's communicating with the actual external service.

Outcome:

This stub-based approach enabled functional testing of the main integration flow without waiting for the agent setup. It allowed developers and testers to validate business logic early, improving delivery timelines. Later in SIT/UAT, switching to the real service will only require updating the lookup to point to the actual endpoint.


Featured Post

OIC - OIC Utility to Reprocess Failed Real-Time Integration JSON Payloads

📌 Use Case In real-time OIC integrations, JSON payloads are exchanged with external systems via REST APIs. When such integrations fail (du...