Unified Architecture topics related to OPC UA Specification, compliant behavior and any technical issues of OPC UA, like Security, Information Model, Companion Specs DI, PLCopen, ADI, ...
I always thought that the ApplicationUri of a server (as returned by the FindServers service) would be exactly the same as the ServerUri of the server (as found in the ServerArray). But it turns out to be not true (?) since, for the UaDemoServer, both values can be configured separately:
By default, they are not the same even (in case of the UaDemoServer).
Could you please shed some light on why they are not the same? Shouldn't they be the exact same concept (at least for a server), so that clients can match the ServerUris they find in the ServerArray with the ApplicationUris they find during the discovery process?
As you can see from the comment block in the following extract from the XML configuration file, the ApplicationUri setting is part of the build / product information and the ServerUri is part of the instance information. The ApplicationUri is the ProductUri.
The naming of the configuraiton parameters is older than the names in the specification. The names in the specification got changed before final release and did not get changed in the SDK.
<!--Build information for the server application software-->
<ApplicationUri>urn:UnifiedAutomation:UaDemoserver</ApplicationUri>
<ManufacturerName>Unified Automation GmbH</ManufacturerName>
<ApplicationName>C++ SDK UaDemoserver</ApplicationName>
<SoftwareVersion>1.3.0</SoftwareVersion>
<BuildNumber>183</BuildNumber>
<!--Build information end-->
<!--Server instance information defined for the server installation.
[NodeName} can be used as placeholder for the computer name. -->
<ServerUri>urn:[NodeName]:UnifiedAutomation:UaDemoserver</ServerUri>
<ServerName>OpcDemoServer@[NodeName]</ServerName>
<!--Server instance information end-->
So I take it that <ApplicationUri>...</ApplicationUri> in the current UaDemoServer implementation corresponds to ServerArray[0] as exposed by the demo server, while it should in fact correspond to OpcUa_ApplicationDescription::ProductUri from the discovery process?
My client application requires that ServerArray[0] corresponds to OpcUa_ApplicationDescription::ApplicationUri (as they should if I'm correct!) so for now I will "force" them to be equal by setting <ApplicationUri>...</ApplicationUri> to the same value as <ServerUri>...</ServerUri>.