cancel
Showing results for 
Search instead for 
Did you mean: 

SECURITY_CONTEXT clearing for REST Service

ankurparab
Discoverer
0 Kudos

Hi Members,

We have a created a custom REST webservice to create material in SAP MDG system.

The service is created via SICF making use of a handler class 'CL_REST_HTTP_HANDLER'.

This service is called by an external non SAP client and uses GET and POST operations to create the material.

As per standard SAP documentation, in the GET call the CSRF token is retrieved and the same is passed in the POST. The service work fine as expected.

However in case of bulk messages from the external system, the HTTP security context cache gets full as every call made by the external system generates a new context.

I went through the earlier posts and have seen that the only way to solve is to increase the cache size or reduce the timeout parameter.

I tried setting the timeout paramter in the SICF service lesser than the parameter http/security_session_timeout. However still it considers only the http/security_session_timeout parameter.

Is there any way to resolve this? How can the session context be deleted immediately once the post call is done?

Accepted Solutions (0)

Answers (1)

Answers (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Why aren't you using simply OData?

If you you have a REST Client it should be able to perform posts as well even if not OData SDK is available.

Regards,

Andre