2

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

membersound
  • 81,582
  • 193
  • 585
  • 1,120
  • check this http://stackoverflow.com/a/3121001/1600692 and http://stackoverflow.com/a/3851784/1600692 and may be this http://stackoverflow.com/questions/3916996/webservice-timeout-java-web-service .. can you be more specific about the problem ? – Sreenath S Aug 25 '12 at 14:54

1 Answers1

2

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.

Usman Mutawakil
  • 4,993
  • 9
  • 43
  • 80