ApplicationUri vs. ServerUri

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

Moderator: Support Team

Post Reply
wim
Hero Member
Hero Member
Posts: 24
Joined: 13 Jul 2010, 15:20

ApplicationUri vs. ServerUri

Post by wim »

Hi there,

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:

Code: Select all

  <ApplicationUri>urn:UnifiedAutomation:UaDemoserver</ApplicationUri>
  <!-- ... -->
  <ServerUri>urn:[NodeName]:UnifiedAutomation:UaDemoserver</ServerUri>
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?

Thanks a lot,

Wim

User avatar
Support Team
Hero Member
Hero Member
Posts: 2532
Joined: 18 Mar 2011, 15:09

Re: ApplicationUri vs. ServerUri

Post by Support Team »

Hi Wim,

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.

Code: Select all

<!--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-->
Best Regards,
Unified Automation Support Team

wim
Hero Member
Hero Member
Posts: 24
Joined: 13 Jul 2010, 15:20

Re: ApplicationUri vs. ServerUri

Post by wim »

Hi Unified Automation,

thanks for the info.

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

Cheers,

Wim

Post Reply