OPCFoundation / UA-Java-Legacy

This repository is provided by OPC Foundation as legacy support for an Java version for OPC UA.
https://github.com/OPCFoundation/UA-.NETStandard
Other
355 stars 227 forks source link

XmlDecoder.getExtensionObject should pass it's own NamespaceTable for Structure decoding #146

Closed bjakke closed 6 years ago

bjakke commented 6 years ago

XmlDecoder.getExtensionObject tries to eagerly decode the Structure. However it fails to pass a NamespaceTable that might have been set to the XmlDecoder.setNamespaceTable to the ExtensionObject.decode, which then by default uses the NamespaceTable from the EncoderContext.

Assuming the tables are same, no problem, however the XmlDecoder.setNamespaceTable allows a different table to be set, which will the affect how NodeIds and other constructs having a namespace index are decoded. It can be used e.g. to parse values from a Xml snipped from a NodeSet Values to the correct namespace indexes for the address space.

bjakke commented 6 years ago

Fixed via the referenced commit.