This Serviceis used to terminate a Session. The Servertakes the following actions when it receives a CloseSessionrequest:
- It stops accepting requests for the Session. All subsequent requests received for the Sessionare discarded.
- 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.
- 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.
Table 19defines the parameters for the Service.
Table 19– CloseSession Service Parameters
Name |
Type |
Description |
Request |
|
|
requestHeader |
RequestHeader |
Common request parameters (see 7.33for RequestHeaderdefinition). |
deleteSubscriptions |
Boolean |
If the value is TRUE, the Serverdeletes all Subscriptionsassociated with the Session. If the value is FALSE, the Serverkeeps the Subscriptionsassociated with the Session until they timeout based on their own lifetime. |
|
|
|
Response |
|
|
responseHeader |
ResponseHeader |
Common response parameters (see 7.34for ResponseHeaderdefinition). |
Table 20defines the Serviceresults specific to this Service. Common StatusCodesare defined in Table 182.
Table 20– CloseSession Service Result Codes
Symbolic Id |
Description |
Bad_SessionIdInvalid |
See Table 182for the description of this result code. |