Skip to Content
0
May 18, 2020 at 03:24 PM

SAP B1H Service Layer. Logout not working as expected.

696 Views Last edit May 18, 2020 at 03:29 PM 3 rev

Hi all,

We are using SAP B1H (Version :10.00.110) Service Layer as backend from some Node JS REST Services:

1. We make a POST call to Login endpoint from Node and we get Service Layer cookies as expected

2. We can perform some CRUD operations using Service Layer cookies. As example we get users from .../b1s/v1/Users endpoint.

3. We make a POST to b1s/v1/Logout endpoint and we receive a 204 Status as expected.

After that, we are making get calls to Users endpoint and some times we get response with user data. Afer Logout was done.

I attach Service Layer trace from Service Layer Logs (:40000/ServiceLayerController):

POST Login endpoint . Status 200: OK

[18/May/2020:16:51:20 +0200] 10.11.11.5 899802 "POST /b1s/v1/Login HTTP/1.1" 200 204 t=0s pid=62459 sid=- n=- -

GET Users endpoint. Status 200, SESSIONID = 09453b20-9917-11ea-8000-005056ad7a5d OK

[18/May/2020:16:51:21 +0200] 10.11.11.5 955769 "GET /b1s/v1/Users?$filter=UserCode%20eq%20%27manager%27&$select=InternalKey,UserCode,UserName,eMail,MobilePhoneNumber,FaxNumber HTTP/1.1" 200 302 t=0s pid=62458 sid=09453b20-9917-11ea-8000-005056ad7a5d n=.node1 -

GET Users endpoint. Status 200, SESSIONID = 09453b20-9917-11ea-8000-005056ad7a5d OK

[18/May/2020:16:51:29 +0200] 10.11.11.5 7548950 "GET /b1s/v1/Users HTTP/1.1" 200 676105 t=7s pid=62458 sid=09453b20-9917-11ea-8000-005056ad7a5d n=.node1 -

POST Logout endpoint. Status 204 SESSIONID = 09453b20-9917-11ea-8000-005056ad7a5d OK. CLOSED SESSION.

[18/May/2020:16:51:40 +0200] 10.11.11.5 97716 "POST /b1s/v1/Logout HTTP/1.1" 204 - t=0s pid=62458 sid=09453b20-9917-11ea-8000-005056ad7a5d n=.node1 -

GET Users endpoint. Status 401, SESSIONID = 09453b20-9917-11ea-8000-005056ad7a5d OK. INVALID SESSION

[18/May/2020:16:51:42 +0200] 10.11.11.5 102079 "GET /b1s/v1/Users HTTP/1.1" 401 164 t=0s pid=62458 sid=09453b20-9917-11ea-8000-005056ad7a5d n=.node1 -


GET Users endpoint. Status 200, SESSIONID = 09453b20-9917-11ea-8000-005056ad7a5d ERROR!!. THIS SESSION SHOULD BE INVALID

[18/May/2020:16:51:44 +0200] 10.11.11.5 5047706 "GET /b1s/v1/Users HTTP/1.1" 200 676105 t=5s pid=62459 sid=09453b20-9917-11ea-8000-005056ad7a5d n=.node1 -

[18/May/2020:16:51:52 +0200] 10.11.11.5 3551428 "GET /b1s/v1/Users HTTP/1.1" 200 676105 t=3s pid=62459 sid=09453b20-9917-11ea-8000-005056ad7a5d n=.node1 -


GET Users endpoint. Status 401, SESSIONID = 09453b20-9917-11ea-8000-005056ad7a5d OK. INVALID SESSION

[18/May/2020:16:51:57 +0200] 10.11.11.5 111675 "GET /b1s/v1/Users HTTP/1.1" 401 164 t=0s pid=62458 sid=09453b20-9917-11ea-8000-005056ad7a5d n=.node1 -

GET Users endpoint. Status 200, SESSIONID = 09453b20-9917-11ea-8000-005056ad7a5dERROR!!. THIS SESSION SHOULD BE INVALID

[18/May/2020:16:51:59 +0200] 10.11.11.5 4380775 "GET /b1s/v1/Users HTTP/1.1" 200 676105 t=4s pid=62459 sid=09453b20-9917-11ea-8000-005056ad7a5d n=.node1 -

After Logout we receive data from GET calls.

Kind regards,

Nau