Referencing local Namespaces

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
chuber50
Jr. Member
Jr. Member
Posts: 2
Joined: 21 Nov 2018, 15:21

Referencing local Namespaces

Post by chuber50 »

Hello Support-Team,

i am manually generating a XML-Nodeset (according to and validating against http://opcfoundation.org/UA/2011/03/UANodeSet.xsd).
Since i have more than one "Module", i wanted to separate components into individual XML files.

For example, i have a base XML Nodeset, containing some TypeDefinitions and a "camera" XML Nodeset, containing its own TypeDefinitions and referencing some of the base nodeset.
This results in two XML Nodesets, locally stored on my machine:

C:\OPCUA\base.xml
C:\OPCUA\camera.xml

Now, if i create a new UAModeler project and add the "base.xml" to Base Models, i get an error message:
"The NamespaceUri file:///C:/OPCUA/camera.xml could not be selected.

I tried replacing the NamespaceUrl by some URL like http://mycompany.com/OPCUA/camera, but got the same error.

I tried URLs and File URLs where the text is marked with !!!!!, but could not make it work.
Interestingly, the UAModeler recognizes that the model is based on more models and asks to select them. If i do this, the Opc.Ua.Di.Nodeset2, which is delivered with the modeler, is automatically selected. It seems to work for this one, but not the custom one.

The corresponding base.xml-File is defined like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<UANodeSet 
xmlns="http://opcfoundation.org/UA/2011/03/UANodeSet.xsd" 
xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd" 
xmlns:s3="http://opcfoundation.org/UA/DI/" 
xmlns:s4="!!!!!http://mycompany.com/OPCUA/camera!!!!!">

    <NamespaceUris>
        <Uri>http://mycompany.com/OPCUA/</Uri>
        <Uri>http://opcfoundation.org/UA/DI/</Uri>
	<Uri>!!!!!file:///C:/OPCUA/camera.xml!!!!!</Uri>
    </NamespaceUris>

    <Models>
        <Model ModelUri="http://mycompany.com/OPCUA/" Version="1.0" PublicationDate="2018-11-26T10:27:05.728+01:00">
            <RequiredModel ModelUri="http://opcfoundation.org/UA/" Version="1.0" PublicationDate="2018-11-26T10:27:05.728+01:00"/>
            <RequiredModel ModelUri="http://opcfoundation.org/UA/DI" Version="1.0" PublicationDate="2018-11-26T10:27:05.728+01:00"/>
            <RequiredModel ModelUri="!!!!!http://mycompany.com/OPCUA/camera!!!!!" Version="1.0" PublicationDate="2018-11-26T10:27:05.728+01:00"/>
        </Model>
    </Models>
</UANodeSet>
Please help!

Best regards,
Chris

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

Re: Referencing local Namespaces

Post by Support Team »

Hello,

you need to add the models in the correct order to your project. I.e. if model A is based on model B (model A is referencing model B), then you need to load model B first and then model A.
Best regards
Unified Automation Support Team

s_schmidt
Full Member
Full Member
Posts: 7
Joined: 22 Mar 2019, 09:34

Re: Referencing local Namespaces

Post by s_schmidt »

Hello Support-Team,

I have tried adding the IEC61850 NodeSets (Companion Secification) to my UaModeler Project, and it has the same problem. It consists of three nodesets: http://opcfoundation.org/UA/IEC61850-7-3,http://opcfoundation.org/UA/IEC61850-6 and http://opcfoundation.org/UA/IEC61850-7-3. All are based on the Nodeset IEC61850-7-3 . I tried loading the xml for 7-3 first and then adding the others but it still didn't work. Is there something else I need to do?

Thank You!

Post Reply