UaNodeSet.toXml() does not include <Models> tag?

Questions regarding the use of the Java SDK for Server or Client development or integration into customer products ...

Moderator: uasdkjava

Post Reply
mrubio
Jr. Member
Jr. Member
Posts: 3
Joined: 05 Dec 2024, 09:41

UaNodeSet.toXml() does not include <Models> tag?

Post by mrubio »

Hi,
I am testing the Java OPC UA SDK you offer (from Prosys). I wanted to try a simple loop where I load to a Server the DI companion specification NodeSet2.xml file, I then add to my custom `NodeManagerUaNode` an instance node of an `ObjectType` defined in the DI, and lastly I convert the `NodeManagerUaNode` to `UaNodeSet` (using `toNodeSet()`) to then export it to a NodeSet2.xml file using `toXml()`.

The output XML file is correctly generated. But, to my surprise, the <Models> and corresponding <Model> & <RequiredModel> tags are not present in the XML file. Is there a way within the SDK to include that information? My server depends on those tags to order the xml files passed to it and load them.
Otherwise, I would do my own implementation of it.

Example of the <Models> tag from the DI companion specification:

Code: Select all

<Models>
    <Model ModelUri="http://opcfoundation.org/UA/DI/" XmlSchemaUri="http://opcfoundation.org/UA/DI/Types.xsd" Version="1.04.0" PublicationDate="2022-11-03T00:00:00Z">
      <RequiredModel ModelUri="http://opcfoundation.org/UA/" XmlSchemaUri="http://opcfoundation.org/UA/2008/02/Types.xsd" Version="1.05.01" PublicationDate="2022-02-24T00:00:00Z" />
    </Model>
  </Models>
toNodeSet() - https://documentation.prosysopc.com/JSDK/javadoc/com/prosysopc/ua/server/NodeManagerUaNode.html#toNodeSet--
toXml() - https://documentation.prosysopc.com/JSDK/javadoc/com/prosysopc/ua/UaNodeSet.html#toXml--

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

Re: UaNodeSet.toXml() does not include <Models> tag?

Post by Support Team »

Hi,

the <Models> is some quite new feature, and regarding to the specification only allowed to be present when the server has the MetaData object in the address space.

Not sure about your case, but this would be some typical reason why not shown here.
Best regards
Unified Automation Support Team

Post Reply