Skip to main content
Question

Apps10 send Json message

  • June 19, 2026
  • 1 reply
  • 10 views

Forum|alt.badge.img+1

I’m trying to send a simple json message using PLSQL_Rest_Sender_API.Call_Rest_EndPoint2.

But I keep getting errors in the application message.
“Failure while obtaining result: java.lang.NullPointerException 
Caused by: commonj.work.WorkException: java.lang.NullPointerException 
Caused by: java.lang.NullPointerException: null”

I noticed that despite sending a json, it takes it as a xml in the message input data. How can I ask the logic to use json?
 

1 reply

ashen_malaka_ranasinghe
Hero (Employee)
Forum|alt.badge.img+14

Hi ​@YPRANDIP,

The issue occurs because PLSQL_Rest_Sender_API.Call_Rest_EndPoint2 defaults to handling the payload as XML unless the Content-Type header is explicitly set to JSON. To force JSON processing, you need to ensure that your request includes the header Content-Type: application/json and that the payload is passed as plain text (CLOB/VARCHAR) without XML wrapping. If this header is missing, the framework tries to interpret the message as XML, which can lead to the observed NullPointerException. So, update your call to explicitly set the HTTP header for JSON (and optionally Accept: application/json) when invoking the endpoint.