Search code examples
opc-uamilo

Trouble Overriding addNodes Method in Eclipse Milo's NodeManagementServices


I'm currently working on an OPC UA server using Eclipse Milo 0.6.12 and I've encountered a problem with overriding the addNodes method in my implementation of NodeManagementServices. Despite properly overriding the method in my ManagedNamespaceWithLifecycle class, the server continues to invoke the default addNodes method provided by Milo, rather than my custom implementation.

Here’s a snippet of my implementation:

@Override
public void addNodes(AddNodesContext context, List<AddNodesItem> nodesToAdd) {
    System.out.println("called");
    // Implementation details
}

I've ensured that the method signature exactly matches what’s defined in the interface and the class definitely implements NodeManagementServices. However, when I send a request to add a node from a client, it doesn't trigger the overridden method but goes to the default method instead.

Is there something specific that needs to be done to correctly register or acknowledge the overridden method in the server setup? Any advice or debugging tips would be greatly appreciated!

Thank you in advance for your help!

I want my overridden addNodes method to be executed instead of the default method provided by Eclipse Milo.


Solution

  • Do you have a custom AddressSpaceFilter configured? Do the Nodes you're trying to add belong to your Namespace implementation according to the namespace index?