This Serviceis used to terminate a Session. The Servertakes the following actions when it receives a CloseSessionrequest:

  1. It stops accepting requests for the Session. All subsequent requests received for the Sessionare discarded.
  2. It returns negative responses with the StatusCodeBad_SessionClosed to all requests that are currently outstanding to provide for the timely return of the CloseSessionresponse. Clientsare urged to wait for all outstanding requests to complete before submitting the CloseSessionrequest.
  3. It removes the entry for the Clientin its SessionDiagnosticsArray Variable.

When the CloseSession Service is called before the Sessionis successfully activated, the Servershall reject the request if the SecureChannelis not the same as the one associated with the CreateSessionrequest.