Register today for Oracle CloudWorld. October 17th - 20th, Las Vegas

Register now

Hillel Cooperman, Senior VP of User Experience Design, has a message for you on Oracle CloudWorld

Watch now
Mapper Not Wrapping Array Content in Separate Objects — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Mapper Not Wrapping Array Content in Separate Objects

Received Response
11
Views
1
Comments

Oracle Integration Classic (Version 20.1.3)

Hi Community

We are using OIC Classic with the REST Adapter. The REST web service requires a POST and expects the following payload structure:

{
    "name": "A string",
    "parameters": [
        {
            "InvoiceNumber": "A string"
        },
        {
            "BusinessUnit": "A string"
        },
        {
            "SupplierName": "A string"
        }
    ]
}

When we wire this up via the mapper, the result is that OIC sends the request payload without the values enclosed in a single object rather than each value in a separate object:

{
    "name": "ValidateInvoice",
    "parameters": [
       {
         "InvoiceNumber": "ABCD-1234"
         "BusinessUnit": "My Business Unit"
         "SupplierName": "ABC Limited"
       }
     ]
}

 The XSLT in the mapper is as follows:

<xsl:template match="/" xml:id="id_11">
       <nstrgmpr:execute xml:id="id_12">
          <ns35:request-wrapper xml:id="id_41">
             <ns35:parameters xml:id="id_42">
                <ns35:InvoiceNumber xml:id="id_47">
                   <xsl:value-of xml:id="id_48" select="$GetInvoiceHeader/nsmpr1:executeResponse/ns25:response-wrapper/ns25:data/ns25:data/ns25:INVOICE_NUMBER"/>
                </ns35:InvoiceNumber>
                <ns35:BusinessUnit xml:id="id_45">
                   <xsl:value-of xml:id="id_46" select="$GetInvoiceHeader/nsmpr1:executeResponse/ns25:response-wrapper/ns25:data/ns25:data/ns25:BUSINESS_UNIT"/>
                </ns35:BusinessUnit>
                <ns35:Supplier xml:id="id_43">
                   <xsl:value-of xml:id="id_44" select="$GetInvoiceHeader/nsmpr1:executeResponse/ns25:response-wrapper/ns25:data/ns25:data/ns25:SUPPLIER_NAME"/>
                </ns35:Supplier>
             </ns35:parameters>
          </ns35:request-wrapper>
       </nstrgmpr:execute>
    </xsl:template>

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!