This Serviceis used to transfer a Subscriptionand its MonitoredItemsfrom one Sessionto another. For example, a Clientmay need to reopen a Sessionand then transfer its Subscriptionsto that Session. It may also be used by one Clientto take over a Subscriptionfrom another Clientby transferring the Subscriptionto its Session.

The authenticationTokencontained in the request header identifies the Sessionto which the Subscriptionand MonitoredItemsshall be transferred. The Servershall validate that the Clientof that Sessionis operating on behalf of the same user and that the potentially new Clientsupports the Profilesthat are necessary for the Subscription. If the Clientuses an ANONYMOUSuser token, the Servershall validate if the ApplicationUriis the same for the old and the new Sessionand the MessageSecurityModeis SIGNor SIGNANDENCRYPT. If the Servertransfers the Subscription, it returns the sequence numbers of the NotificationMessagesthat are available for retransmission. The Clientshould acknowledge all Messagesin this list for which it will not request retransmission.

If the Servertransfers the Subscriptionto the new Session, the Servershall issue a StatusChangeNotification notificationMessagewith the status code Good_SubscriptionTransferred to the old Session. The StatusChangeNotification notificationMessagetype is defined in 7.25.4.

Table 100defines the parameters for the Service.

Table 100– TransferSubscriptions Service Parameters

Name

Type

Description

Request

requestHeader

RequestHeader

Common request parameters (see 7.33for RequestHeaderdefinition).

subscriptionIds []

IntegerId

List of identifiers for the Subscriptionsto be transferred to the new Client(see 7.19for IntegerIddefinition). These identifiers are transferred from the primary Clientto a backup Clientvia external mechanisms.

sendInitialValues

Boolean

A Booleanparameter with the following values:

TRUEthe first Publish response(s) after the TransferSubscriptionscall shall contain the current values of all Monitored Items in the Subscriptionwhere 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 Publishresponse. If no value is queued for a data MonitoredItem, the last value sent is repeated in the Publishresponse.

FALSEthe 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.

Response

responseHeader

ResponseHeader

Common response parameters (see 7.34for ResponseHeaderdefinition).

results []

TransferResult

List of results for the Subscriptionsto transfer. The size and order of the list matches the size and order of the subscriptionIdsrequest parameter. This structure is defined in-line with the following indented items.

statusCode

StatusCode

StatusCodefor each Subscriptionto be transferred (see 7.39for StatusCodedefinition).

availableSequence

Numbers []

Counter

A list of sequence number ranges that identify NotificationMessagesthat are in the Subscription’s retransmission queue. This parameter is null or empty if the transfer of the Subscriptionfailed. The Countertype is defined in 7.8.

diagnosticInfos []

DiagnosticInfo

List of diagnostic information for the Subscriptionsto transfer (see 7.12for DiagnosticInfo definition). The size and order of the list matches the size and order of the subscriptionIdsrequest 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 101defines the Serviceresults specific to this Service. Common StatusCodesare defined in Table 182.

Table 101– TransferSubscriptions Service Result Codes

Symbolic Id

Description

Bad_NothingToDo

See Table 182for the description of this result code.

Bad_TooManyOperations

See Table 182for the description of this result code.

Bad_InsufficientClientProfile

The Clientof the current Sessiondoes not support one or more Profilesthat are necessary for the Subscription.

Table 102defines values for the operation level statusCodeparameter that are specific to this Service. Common StatusCodesare defined in Table 183.

Table 102– TransferSubscriptions Operation Level Result Codes

Symbolic Id

Description

Bad_SubscriptionIdInvalid

See Table 182for the description of this result code.

Bad_UserAccessDenied

See Table 182for the description of this result code.

The Clientof the current Sessionis not operating on behalf of the same user as the Sessionthat owns the Subscription.