This Serviceis used to add one or more Referencesto one or more Nodes. The NodeClassis an input parameter that is used to validate that the Referenceto be added matches the NodeClassof the TargetNode. This parameter is not validated if the Referencerefers to a TargetNodein a remote Server.
In certain cases, adding new Referencesto the AddressSpaceshall require that the Serveradd new Serverids to the Server’s ServerArray Variable. For this reason, remote Serversare identified by their URI and not by their ServerArrayindex. This allows the Serverto add the remote ServerURIs to its ServerArray.
Table 25defines the parameters for the Service.
Table 25– AddReferences Service Parameters
Name |
Type |
Description |
Request |
|
|
requestHeader |
Request Header |
Common request parameters (see 7.33for RequestHeaderdefinition). |
referencesToAdd [] |
AddReferences Item |
List of Referenceinstances to add to the SourceNode. The targetNodeClassof each Referencein the list shall match the NodeClassof the TargetNode. This structure is defined in-line with the following indented items. |
sourceNodeId |
NodeId |
NodeIdof the Nodeto which the Referenceis to be added. The source Nodeshall always exist in the Serverto add the Reference. The isForward parameter can be set to FALSE if the target Nodeis on the local Serverand the source Nodeon the remote Server. |
referenceTypeId |
NodeId |
NodeIdof the ReferenceTypethat defines the Reference. |
isForward |
Boolean |
If the value is TRUE, the Servercreates a forward Reference. If the value is FALSE, the Servercreates an inverse Reference. |
targetServerUri |
String |
URI of the remote Server. If this parameter is not null or empty, it overrides the serverIndexin the targetNodeId. |
targetNodeId |
Expanded NodeId |
Expanded NodeIdof the TargetNode. The ExpandedNodeIdtype is defined in 7.16. |
targetNodeClass |
NodeClass |
NodeClassof the TargetNode. The Clientshall specify this since the TargetNodemight not be accessible directly by the Server. |
|
|
|
Response |
|
|
responseHeader |
Response Header |
Common response parameters (see 7.34for ResponseHeaderdefinition). |
results [] |
StatusCode |
List of StatusCodesfor the Referencesto add (see 7.39for StatusCodedefinition). The size and order of the list matches the size and order of the referencesToAddrequest parameter. |
diagnosticInfos [] |
Diagnostic Info |
List of diagnostic information for the Referencesto add (see 7.12for DiagnosticInfo definition). The size and order of the list matches the size and order of the referencesToAddrequest 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 26defines the Serviceresults specific to this Service. Common StatusCodesare defined in Table 182.
Table 26– AddReferences 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. |
Table 27defines values for the resultsparameter that are specific to this Service. Common StatusCodesare defined in Table 183.
Table 27– AddReferences Operation Level Result Codes
Symbolic Id |
Description |
Bad_SourceNodeIdInvalid |
See Table 183for the description of this result code. |
Bad_ReferenceTypeIdInvalid |
See Table 183for the description of this result code. |
Bad_ServerUriInvalid |
See Table 182for the description of this result code. |
Bad_TargetNodeIdInvalid |
See Table 183for the description of this result code. |
Bad_NodeClassInvalid |
See Table 183for 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 182for the description of this result code. |
Bad_DuplicateReferenceNotAllowed |
The reference type between the nodes is already defined. |
Bad_InvalidSelfReference |
The Serverdoes not allow this type of self reference on this node. |