cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice Cookie Issue

Former Member
0 Kudos

Hello folks,

I exposed a BAPI as a webservice, which requires an external commit. This works so far, I can write and commit data successfully. To accomplish this, I just return the sap-contextid and mysapsso2 cookies to the server when sending the commit request (soap).

My problem now ist, that every time I call the webservice (both ws-methods: data-request + commit-request), another session with the name "plugin http" is created (can be observed in sm04).

I tried to use both mentioned cookies (sap-contextid, mysapsso2) when calling the webservice again, after a first commit. Doing so, the http status code 500 is returned.

Has anybody had a similar problem and knows how to solve the issue with the cookies, so that one user can work in one http session until he ends the client application. It is important, that every single action is commited, not just at the end of the user session.

Or is it possible to close the http session after every commit, so that the system is not spammed with http sessions?

I would be grateful if somebody could help me, I have been trying to solve the problem all the day!

Regards,

Daniel

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Can you check if you change this service as stateful?

SE80->Yourservice->Configuration->Stateful Communication

Refer to this thread:

Regadrs,

Gourav

Former Member
0 Kudos

Hi,

thank you for your reply.

Yes I had already set up the webservice as stateful.

Any other ideas?

Regards,

Daniel

Former Member
0 Kudos

Hi Daniel,

Try SAP Note 568271 (Lifetime of an RFC Connection) and the related notes at the bottom and see if helps, particularly the RfcClose API Function reference.

Regards, Trevor