Integrate > Service Manager integration methods and tools > Web Services > SOAP API > Consuming a Service Manager Web Service > Special considerations for using Keep-Alive with Service Manager

Special considerations for using Keep-Alive with Service Manager

A Service Manager user session starts when the Service Manager server receives the first request from a SOAP client and ends when the SOAP client closes the HTTP connection. The user login process is performed in the first SOAP client request and the user logout process is performed when the SOAP client ends this Service Manager session. A SOAP client can reduce the login and logout overhead by enabling HTTP persistent connections, also called HTTP keep-alive. If you want to use HTTP 1.1 Keep-Alive connections with a SOAP API client, the SOAP API client must support cookies. When Service Manager responds to the first POST request from the SOAP API client, it includes a Set Cookie header that conveys the servlet container sessionid to the client.

  • Configure the SOAP stack with which the SOAP API client is written to support cookies. Axis and .NET can both be configured to do this.
  • If the SOAP toolkit supports HTTP 1.1 Keep-Alive but not cookies, you can arrange for the application to echo back the JSESSIONID value in a Cookie header by adding code to the client application to manually create the HTTP header on the second and subsequent requests

Note

  • In HTTP/1.1, persistent connections are the default behavior of any connection.
  • If you use HTTP 1.0 you have to manually set the HTTP header “connection” to keep-alive.
  • A SOAP client ends a Service Manager session by sending a request with the HTTP header “connection” set to “close”. If a close request is never received by the Service Manager server then this session is terminated by the Service Manager server when the webservices_sessiontimeout time is reached.