This Service is used to transfer a Subscription and its MonitoredItems from one Session to another. For example, a Client may need to reopen a Session and then transfer its Subscriptions to that Session. It may also be used by one Client to take over a Subscription from another Client by transferring the Subscription to its Session.
The authenticationToken contained in the request header identifies the Session to which the Subscription and MonitoredItems shall be transferred. The Server shall validate that the Client of that Session is operating on behalf of the same user and that the potentially new Client supports the Profiles that are necessary for the Subscription. If the Client uses an ANONYMOUS user token, the Server shall validate if the ApplicationUri is the same for the old and the new Session and the MessageSecurityMode is SIGN or SIGNANDENCRYPT. If the Server transfers the Subscription, it returns the sequence numbers of the NotificationMessages that are available for retransmission. The Client should acknowledge all Messages in this list for which it will not request retransmission.
If the Server transfers the Subscription to the new Session, the Server shall issue a StatusChangeNotification notificationMessage with the status code Good_SubscriptionTransferred to the old Session. The StatusChangeNotification notificationMessage type is defined in 7.25.4.
Table 100 defines the parameters for the Service.
Table 100 – TransferSubscriptions Service Parameters
|requestHeader||RequestHeader||Common request parameters (see 7.33 for RequestHeader definition).|
|subscriptionIds ||IntegerId||List of identifiers for the Subscriptions to be transferred to the new Client (see 7.19 for IntegerId definition). These identifiers are transferred from the primary Client to a backup Client via external mechanisms.|
|sendInitialValues||Boolean||A Boolean parameter with the following values: TRUE the first Publish response(s) after the TransferSubscriptions call shall contain the current values of all Monitored Items in the Subscription where the Monitoring Mode is set to Reporting. If a value is queued for a data MonitoredItem, the next value in the queue is sent in the Publish response. If no value is queued for a data MonitoredItem, the last value sent is repeated in the Publish response. FALSE the first Publish response after the TransferSubscriptions call shall contain only the value changes since the last Publish response was sent.This parameter only applies to MonitoredItems used for monitoring Attribute changes.|
|responseHeader||ResponseHeader||Common response parameters (see 7.34 for ResponseHeader definition).|
|results ||TransferResult||List of results for the Subscriptions to transfer. The size and order of the list matches the size and order of the subscriptionIds request parameter. This structure is defined in-line with the following indented items.|
|statusCode||StatusCode||StatusCode for each Subscription to be transferred (see 7.39 for StatusCode definition).|
|availableSequence Numbers ||Counter||A list of sequence number ranges that identify NotificationMessages that are in the Subscription’s retransmission queue. This parameter is null or empty if the transfer of the Subscription failed. The Counter type is defined in 7.8.|
|diagnosticInfos ||DiagnosticInfo||List of diagnostic information for the Subscriptions to transfer (see 7.12 for DiagnosticInfo definition). The size and order of the list matches the size and order of the subscriptionIds request parameter. This list is empty if diagnostics information was not requested in the request header or if no diagnostic information was encountered in processing of the request.|
Table 101 – TransferSubscriptions Service Result Codes
|Bad_NothingToDo||See Table 182 for the description of this result code.|
|Bad_TooManyOperations||See Table 182 for the description of this result code.|
|Bad_InsufficientClientProfile||The Client of the current Session does not support one or more Profiles that are necessary for the Subscription.|
Table 102 – TransferSubscriptions Operation Level Result Codes
|Bad_SubscriptionIdInvalid||See Table 182 for the description of this result code.|
|Bad_UserAccessDenied||See Table 182 for the description of this result code.The Client of the current Session is not operating on behalf of the same user as the Session that owns the Subscription.|