This Service is used to add one or more References to one or more Nodes. The NodeClass is an input parameter that is used to validate that the Reference to be added matches the NodeClass of the TargetNode. This parameter is not validated if the Reference refers to a TargetNode in a remote Server.

In certain cases, adding new References to the AddressSpace shall require that the Server add new Server ids to the Server’s ServerArray Variable. For this reason, remote Servers are identified by their URI and not by their ServerArray index. This allows the Server to add the remote Server URIs to its ServerArray.

Table 25 defines the parameters for the Service.

Table 25 – AddReferences Service Parameters

Name

Type

Description

Request

requestHeader

Request Header

Common request parameters (see 7.28 for RequestHeader definition).

referencesToAdd []

AddReferences Item

List of Reference instances to add to the SourceNode. The targetNodeClass of each Reference in the list shall match the NodeClass of the TargetNode. This structure is defined in-line with the following indented items.

sourceNodeId

NodeId

NodeId of the Node to which the Reference is to be added. The source Node shall always exist in the Server to add the Reference. The isForward parameter can be set to FALSE if the target Node is on the local Server and the source Node on the remote Server.

referenceTypeId

NodeId

NodeId of the ReferenceType that defines the Reference.

isForward

Boolean

If the value is TRUE, the Server creates a forward Reference. If the value is FALSE, the Server creates an inverse Reference.

targetServerUri

String

URI of the remote Server. If this parameter is not null, it overrides the serverIndex in the targetNodeId.

targetNodeId

Expanded NodeId

Expanded NodeId of the TargetNode. The ExpandedNodeId type is defined in 7.11.

targetNodeClass

NodeClass

NodeClass of the TargetNode. The Client shall specify this since the TargetNode might not be accessible directly by the Server.

Response

responseHeader

Response Header

Common response parameters (see 7.29 for ResponseHeader definition).

results []

StatusCode

List of StatusCodes for the References to add (see 7.34 for StatusCode definition). The size and order of the list matches the size and order of the referencesToAdd request parameter.

diagnosticInfos []

Diagnostic Info

List of diagnostic information for the References to add (see 7.8 for DiagnosticInfo definition). The size and order of the list matches the size and order of the referencesToAdd 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 26 defines the Service results specific to this Service. Common StatusCodes are defined in Table 177.

Table 26 – AddReferences Service Result Codes

Symbolic Id

Description

Bad_NothingToDo

See Table 177 for the description of this result code.

Bad_TooManyOperations

See Table 177 for the description of this result code.

Table 27 defines values for the results parameter that are specific to this Service. Common StatusCodes are defined in Table 178.

Table 27 – AddReferences Operation Level Result Codes

Symbolic Id

Description

Bad_SourceNodeIdInvalid

See Table 178 for the description of this result code.

Bad_ReferenceTypeIdInvalid

See Table 178 for the description of this result code.

Bad_ServerUriInvalid

See Table 177 for the description of this result code.

Bad_TargetNodeIdInvalid

See Table 178 for the description of this result code.

Bad_NodeClassInvalid

See Table 178 for the description of this result code.

Bad_ReferenceNotAllowed

The reference could not be created because it violates constraints imposed by the data model on this Server.

Bad_ReferenceLocalOnly

The reference type is not valid for a reference to a remote Server.

Bad_UserAccessDenied

See Table 177 for the description of this result code.

Bad_DuplicateReferenceNotAllowed

The reference type between the nodes is already defined.

Bad_InvalidSelfReference

The Server does not allow this type of self reference on this node.