Mapper Not Wrapping Array Content in Separate Objects
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>
            Tagged:
            
        
0