Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
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

Empty XML elements are converted to JSON array instead of String in OIC REST Adapter

edited Jun 17, 2020 2:46PM in Integration 11 comments

Summary

JSON inline schema option in REST adapter converts empty XML elements to JSON array instead of String making the REST API to fail

Content

Hi Experts,

I am calling an external REST API from OIC[version 20.1.3.0.0 (200401.0200.34935)] and has selected the JSON inline schema as the Request Payload.

Example of sample payload

{

    "pjOpenDate":"2020-06-20",

    "acClosingDate": "2020-06-20",

    "acOpeningDate": "2020-05-19",

    "Status": "Open",

    "projectedTakeoverDate":"2020-06-20",

    "location": {

        "id": "123456"

    }

}

 

In OIC mapper, it is a one to one mapping . This works fine when all the above fields have value. It fails in OIC layer when one of the value doesn't have any value and mapping creates an element like </pjOpenDate>.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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