Get Involved. Join the Conversation.


    Mohana Gopal Selvam
    Handling Null value in the mappingAnswered
    Topic posted September 27, 2019 by Mohana Gopal SelvamSilver Crown: 22,500+ Points, last edited September 27, 2019, tagged Mapping 
    148 Views, 11 Comments
    Handling Null value in the mapping


    In my integration, I got the Null value as response in one of my source as shown below. I used this field in my mapper to map to target.

        "x_total_deposit": 1000,
        "x_avail_deposit": null,
        "x_return_status": "S"

    I got the Translation error when I invoke the OIC API, since null value is mapped to end response field. 

      "type" : "10.5.3",
      "title" : "exception occurred while translating the response into the accepted media type.",
      "detail" : " ORABPEL-15236\n\n",
      "o:errorCode" : "TRANSLATION-ERROR-01",
      "o:errorDetails" : [ {
        "type" : "NA",
        "instance" : "NA",
        "title" : "NA",
        "o:errorPath" : "NA",
        "o:errorCode" : "NA"
      } ]

    How to handle the null value in the mapping in OIC?



    Best Comment

    Monish Munot

    I believe you will have to deal with if-else conditions in the mapping to avoid passing 'null' value further. You can identify all the elements which may send out null values and put the conditions. Though this is not good approach, but a way out.