SAP Knowledge Base Article - Preview

3204421 - JSON null value cause HTTP 500 error when using JSON to XML conversion with REST Adapter

Symptom

You are using SAP PI/PO Rest Adapter and your JSON payload contains "null" values for JSON elements. You are using JSON to XML conversion, and the payload is rejected with HTTP 500 error. You have collected XPI Inspector with Example 50 and the following error is displayed:

 

java.lang.NullPointerException: while trying to invoke the method java.lang.Object.toString() of a null object returned from com.sap.aii.adapter.rest.ejb.json.CustomMappedNamespaceConvention.convertType(java.lang.String, com.sap.aii.adapter.rest.ejb.json.CustomMappedNamespaceConvention$JSONType, java.lang.String)
at com.sap.aii.adapter.rest.ejb.json.JsonConverter.jsonToXML(JsonConverter.java:227)
at com.sap.aii.adapter.rest.ejb.sender.RESTSenderChannel.convertJSONRequest(RESTSenderChannel.java:886)
at com.sap.aii.adapter.rest.ejb.sender.RESTSenderChannel.applyMessage(RESTSenderChannel.java:1044)
at com.sap.aii.adapter.rest.ejb.sender.RESTSenderChannel.service(RESTSenderChannel.java:325)
at com.sap.aii.adapter.rest.ejb.RESTAdapter.service(RESTAdapter.java:322)
at com.sap.aii.adapter.rest.web.RESTServlet.service(RESTServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)


Read more...

Environment

  • SAP Process Integration
  • SAP Process Orchestration

Product

SAP Process Integration all versions

Keywords

JSON, JSON to XML, Conversion, REST Adapter, SAP Process Orchestration , KBA , BC-XI-CON-RST , Rest Adapter , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.