cancel
Showing results for 
Search instead for 
Did you mean: 

Closing Stateful web service connections

Former Member
0 Kudos

Hi All,

I've created a staeful web service and we are doing load tests for 50-100 concurrent users on this webservice.

After some time we are getting invalid response time exceptions while calling the web service.

In transaction SM04 , we observed all the (HTTP connections)stateful connections are opened and after reaching 1000 users its anot allowing further webservice calls.

How can we close the staeful web service connections . I am cosuming this web service in java.

Please let me know.

Thanks,Anilkumar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

this is a very interesting question. Since I didn't know how the WAS ABAP actually supports stateful webservices at all I did research it a little. It seems that there is no standard for stateful webservices in existence (yet?). So there seem to be two mechanisms actually used to maintain session (in the world not SAP), one by (mis)using WS-Adressing and the other one by simply using HTTP sessions (cookies). Using WS-Addressing would be reflected in the WSDL which isn't the case (Rel. 7.0). So this must be achieved by HTTP session cookies.

In HTTP session management there is, AFAIK, no mechanism to allow the client to explicitly close a server session. Usually the client destroys it's session and the corresponding server session simply times out because it is not called for a certain amount of time.

Second, IMHO, such a session is not much good for (apart from getting rid of successive authentication) as long as the application cannot access the session information. I am not aware how a function module underlying a webservice can access this session information.

In conclusion, I would be very interested if you could share a bit on how youse stateful connections and what you can achieve with it.

regards, anton

Former Member
0 Kudos

Hi Anton,

I've solved the issue by closing the server resources in my client end as below.

com.sap.engine.services.webservices.espbase.client.api.SessionInterface sessionInterface = com.sap.engine.services.webservices.espbase.client.api.SessionInterfaceFactory.getInterface(proxyObject)

sessionInterface.closeSesison();

sessionInterface.releaseServerResources();

We are working on integration between CRM and store for getting pricing info.Customers keep adding/removing the items to the cart and finally they will checkout.

First time when he queries for a product ,GUIDs returned back .For the subsequesnt calls we use these guids . Here we need a statful webservice to maintain the state of the GUIDs.

Thanks,Anil