Reputation: 86747
I have a @WebService
class. If I make a connection from clients, sometimes there will be tasks that may last a few minutes. And first if this task is finished, the soap should return the response.
This means the connection for a single request between client and webserver should not time out during this longer request.
How can I configure the timeout for this procedure? And if it is configurable, has this to be done on client or server side?
Thanks
Upvotes: 2
Views: 9828
Reputation: 5259
Server Side
I would configure it as you would any other request. To the server it doesn't matter if it's a web page or an XML SOAP message (web service). In apache tomcat you can configure the server session timeout duration in the Web.xml file of the application. It should be the same for JBoss and other application servers. The sample below would set the session timeout to 30 minutes.
<session-config>
<session-timeout>30</session-timeout>
</session-config>
Client Side
Most SOAP clients use
Connection: Keep-Alive
in the HTTP header of the request, so this shouldn't be an issue.
Upvotes: 2