When sending POST request to Service Desk Mannager REST to /caisd-rest/rest_access, it fails with an error "java.lang.NullPointerException"
search cancel

When sending POST request to Service Desk Mannager REST to /caisd-rest/rest_access, it fails with an error "java.lang.NullPointerException"

book

Article ID: 267875

calendar_today

Updated On: 02-21-2024

Products

CA Service Desk Manager CA Service Management - Service Desk Manager

Issue/Introduction

When we send a POST request from Postman to "http://<SDM_Server>:8050/caisd-rest/rest_access" by following steps on the knowledge document "How to test CA Service Desk Manager REST Web Service functions by using Postman" and SDM document, the following error message is returned and fails to send the POST request by using Basic Authentication.

<ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat"><ns1:faultstring xmlns:ns1="http;//cxf.apache.org/bindings/xformat">java.lang.NullPointerException</ns1:faultstring></ns1:XMLFault>

The following message was written in the pdm_tomcat_REST.log located under (SDM)\log folder.

> From pdm_tomcat_REST.log,

Jun 14, 2023 2:09:57 AM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://service.sdm.rest.ServicePlus.ca.com/}acctypService has thrown exception, unwinding now
java.lang.NullPointerException
    at com.ca.ServicePlus.rest.security.SecurityInInterceptor.handleMessage(SecurityInInterceptor.java:385)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216)

Environment

Release : 17.3 and higher

Cause

The Basic Authentication in REST Web Services is not enabled. 

Resolution

The Basic Authentication in REST Web Services can be enabled from:

  1. Go to 'Options Manager' > 'Web Service' on Administration tab.
  2. Open the Option "rest_webservice_disable_basic_auth" and set the Option Value to "No".
  3. Restart the Service Desk Manager service.

NOTE: Please ensure that the setting is added to NX.env file as per below.  

e.g. @NX_REST_WEBSERVICE_DISABLE_BASIC_AUTH=No

Additional Information

How to test CA Service Desk Manager REST Web Service functions by using Postman

How to Use the Secret Key Authentication with REST API?

KB Article 277495 is an additional example of "java.lang.NullPointerException" messages associated with REST.