Version 4.6.0

Build: 4.6.0-1594

Release date: 08.09.2021

This is a new minor release of the SDK. It includes improvements to client side reconnection mechanisms and improvements to the PubSub functionality. This release also features some changes to default behavior of Client and Server applications.

The Server SDK and the Code Generator now use the Base OPC UA Information Model NodeSet file version 1.04.9. If you have generated code for information models, they should be regenerated as well to accommodate these changes.

UaClient now treats all Bad (and Uncertain) StatusCodes for ServerStatus as indications of communication errors that trigger reconnecting to the Server. Previously a prefixed set of codes was only used, leading to situations where reconnection was not functioning as expected. Reverting back to previous behavior is possible by calling static UaClient.setUseCommErrorCodes(true).

UaServer now binds to wildcard IP addresses ([::] or by default. It also sends ServiceFault messages instead of normal ServiceResponse messages in case of errors, to conform with the OPC UA specification.

PubSubSystem can now be used in Client applications in addition to Server applications. Also, MQTT JSON is now supported for Subscribers, completing the base support for all UDP-UADP, MQTT-UADP and MQTT-JSON transport profiles as defined in the OPC UA Specifications.

Changes to Common parts

  • Deprecated: CertificateUtils.getKeySize(), CertificateUtils.setKeySize(int) and methods in CertificateUtils and ApplicationIdentity that relied on those methods internally. New methods that take the key size as an input parameter have been added to replace the deprecated methods.

  • New: UaExpandedNodeId as an alternative to ExpandedNodeId. Instead of identifying a Server by its ServerIndex, a UaExpandedNodeId identifies the Server by its ServerUri. A UaExpandedNodeId also only identifies the Namespace only by its NamespaceUri.

  • New: JsonDecoder, used to enable Subscriber functionality with MQTT-JSON.

  • New: StructureSpecification.getJavaClass().

  • New: EnumerationSpecification.getJavaClass().

  • New: UaApplication.getServerTable() and UaApplication.getApplicationIdentity(), both of which were already implemented by UaClient and UaServer.

  • New: MultiDimensionArrayUtils.deepGet(…​) and MultiDimensionArrayUtils.deepSet(…​).

  • New: ByteString.fromHex(String) and ByteString.toHex().

  • New: Structure.set(String, Object), Structure.get(String), Structure.Builder.set(String, Object) and Structure.Builder.specification().

  • Improved: ApplicationIdentity.loadOrCreateHttpsCertificate(…​) will append the key size to the opc.https certificate file name.

    Applications that use this method to load or create their opc.https certificate will recreate that certificate after updating to this version of the SDK. If you need to use your original opc.https certificate, use KeyPair.load() instead.
  • Improved: Various improvements to UaNodeId and UaQualifiedName.

  • Improved: Instances of UaNamespace and subtypes of OptionSet DataType, e.g. AccessLevelType are now weak-interned and static factory methods are used to return cached instances.

  • Fixed: JsonEncoder.putDateTime(String, DateTime) now uses the UTC time zone instead of the local time zone.

  • Fixed: MultiDimensionArrayUtils.printArrayDeep(Object, PrintStream) now correctly uses the given PrintStream instead of System.out.

  • Fixed: Alias values are now correctly used for Reference target NodeIds when loading NodeSet2 XML models.

  • Fixed: ArrayIterator.getIndices() now returns a copy of the internal array.

  • Fixed: SecurityPolicy.getSecurityPolicy(String) now returns Security Policy None for an empty String.

Changes to Client SDK

  • New UaClient.getCommErrorCodes() returns a Set of StatusCodes that indicate communication errors when reading Server status or handling PublishResponses. This set of StatusCodes can be modified to add or remove StatusCodes.

  • Improved: Subscription.setRecreateFailedItems(boolean) can be called to enable a Subscription to automatically attempt to recreate MonitoredItems with error code Bad_NodeIdUnknown since this StatusCode can imply in some cases that the Server hasn’t added that Node to its AddressSpace yet.

  • Improved: Logging related to Subscriptions.

  • Changed: Undeprecated TypeDictionary.binaryEncode(DynamicStructure) and TypeDictionary.decode(ExtensionObject). They were deprecated in 4.5.8, but are needed if SDK is set to not automatically initialize or use TypeDictionary.

  • Changed: When reading Server status, all Bad and Uncertain StatusCodes received will be treated as indications of communication errors and thus triggering a reconnect. Use static UaClient.setUseCommErrorCodes(boolean) to enable filtering of StatusCodes such that only the StatusCodes that belong to the Set of StatusCodes returned by static UaClient.getCommErrorCodes() will indicate communication errors.

  • Fixed: UserIdentity with IssuedIdentityToken now has PolicyId correctly set.

Changes to Server SDK

  • New: Support for letting the Server have the operating system choose an available port for opc.tcp and opc.https Endpoints by setting the port to -1 with UaServer.setPort.

  • New: EndpointServiceRequest.sendServiceFaultsForBadServiceLevelOpcHttpsResponses flag that is same as EndpointServiceRequest.sendServiceFaultsForBadServiceLevelResponses but only affects opc.https connections. The default value of the flag is false.

  • Changed: Using the latest Base OPC UA Information Model NodeSet file version 1.04.9

  • Changed: The default maximum MonitoredItems per Subscription has been increased from 1000 to 10000. Another value can be set by calling SubscriptionManager.setMaxMonitoredItemsPerSubscription(…​).

  • Changed: The default value of UaServer.getBindAddresses() is now the IPv6 wildcard ([::]) when IPv6 is enabled and the IPv4 wildcard ( otherwise.

  • Changed: send ServiceFault messages instead of normal ServiceResponse messages in case of errors. EndpointServiceRequest.sendServiceFaultsForBadServiceLevelResponses = false can be used to revert back to the old functionality. This only affects opc.tcp connections.

  • Fixed: Added missing values to the fields of Events of EventQueueOverflowEventType that are generated when the Event buffer of a MonitoredEventItem overflows. The Severity of these Events is set to 1.

  • Fixed: Server.getEndpointDescriptions(SocketAddress) will now return the correct EndpointDescriptions for a Server that has been bound to a wildcard address.

Changes to PubSub SDK

  • New: Added support for subscribing to JSON messages over MQTT.

  • New: Enable UaNode as an alternative to UaNodeId in all parameters of that type in PubSub configuration objects.

  • New: Added static builder interfaces to common configuration interfaces, e.g. PubSubConnectionConf.Builder and PubSubDataSetReaderConf.Builder.

  • New: PubSubTransportProfile Enumeration and PubSubUdpUadpConnectionConf.getTransportProfile(), PubSubMqttJsonConnectionConf.getTransportProfile() and PubSubMqttUadpConnectionConf.getTransportProfile() methods.

  • New: PubSubUdpUadpConnectionConf.Builder.setNetworkInterface(NetworkInterface) and PubSubUdpUadpConnectionConf.Builder.setNetworkInterface(String).

  • New: Sending meta data can be disabled by setting MetaDataQueueName to null or empty String for a PubSubBrokerDataSetWriterTransportSettingsConf.

  • New: PubSubSystemConf.Builder.addOrReplaceConnection(PubSubConnectionConf<?, ?>).

  • New: PubSubUdpUadpConnectionConf.getDiscoveryNetworkAddress() (moved from nested conf object).

  • Improved: Configuring a discovery network address is no longer mandatory. If discovery network address hasn’t been configured, the normal network address will be used.

  • Changed: Renamed PubSubSystem.getConfigurationSnapshot() to PubSubSystem.getConfiguration().

  • Changed: Some nested PubSub configuration interfaces are removed, e.g. PubSubConnectionTransportSettings, PubSubReaderGroupMessageSettings, PubSubReaderGroupTransportSettings, the configuration parameters are moved to the top level configuration object under which they were used.

  • Changed: The following PubSub configuration objects are now enabled by default: PubSubConnectionConf, PubSubDataSetReaderConf, PubSubDataSetWriterConf, PubSubGroupConf, PubSubJsonDataSetReaderConf and PubSubUadpDataSetReaderConf.

  • Changed: PubSubUadpWriterGroupConf.getPublishingOffset() now returns an instance of PubSubPublishingOffsets instead of List<Duration>.

  • Changed: PubSubSystem.createFor now takes UaApplication instead of just UaServer and works in the context of an UaClient. Publishing event datasets (or adding event dataset in the configuration) does not yet work and will be added in a future version.

  • Removed: PubSubBrokerUadpConnectionConf (it was a leftover from the early prototyping era).

Changes to Code Generator

  • Changed: Using the latest Base OPC UA Information Model NodeSet file version 1.04.9

  • Fixed: Characters that would be illegal in Javadoc are now replaced with escape characters correctly when they are used in descriptions in NodeSet2 XML models.

Changes to SampleConsoleClient

  • Improved: MyCertificateValidationListener will now check DNS Names and/or IP Addresses specified in the certificate and compare them to the hostname in the Endpoint URL. If they don’t match, the user will be warned.

Changes to SampleConsoleServer

  • Changed: Binds to the IPv6 wildcard ([::]) when IPv6 is enabled and the IPv4 wildcard ( otherwise.

  • Changed: The name of the sample CA certificate now includes hostname, "https" and certificate size.

  • Changed: The filename of https cert now includes size of the certificate.

  • Fixed: Corrected ValueRanks of some nodes in Root/Objects/StaticData.

Changes to PubSub samples

  • New: SamplePublisherClient and SampleSubscriberClient sample applications.

  • New: Command line argument -I/--publishing-interval for setting the PublishingInterval in Publisher samples.

  • New: Command line argument --no-metadata for disabling meta data sending to MQTT (sets metaDataQueueName=null)

  • New: Command line argument --publisher-id for defining the PublisherId.

  • New: SamplePubSubConfiguration and SampleUtils classes that contain common methods used to create the PubSub configurations and other utility functions used by all PubSub sample applications.

  • Changed: Renamed SamplePubSubPublisherServerSamplePublisherServer, SamplePubSubSubscriberServerSampleSubscriberServer and SamplePubSubBrokerSampleBroker .

  • Changed: The Server samples bind to the IPv6 wildcard ([::]) when IPv6 is enabled and the IPv4 wildcard ( otherwise.

  • Changed: Command line argument n/non-reversible-json is now used for disabling including any headers in network messages and enabling using non-reversible JSON encoding.

  • Fixed: The PubSub Server samples now correctly use the command line argument -P/--port for setting the Server port number.


  • Plus a number of other small changes.

Version 4.5.8

Build: 4.5.8-1468

Release date: 14.07.2021

This release is a bug fix release. Most of the fixes are related to PubSub and JSON encoding. Also the PubSub Tutorial and the samples have been updated.

Changes to Common parts

  • Deprecated: TypeDictionary.binaryEncode, use ExtensionObject.binaryEncode(Structure, EncoderContext) with UaClient.getEncoderContext() instead.

  • Deprecated: TypeDictionary.decode, use ExtensionObject.decode(EncoderContext) with UaClient.getEncoderContext() instead.

  • Fixed: TypeDictionary.binaryEncode didn’t work for custom Structures that had custom Structure fields.

  • Fixed: EncoderContext.shallowCopy didn’t copy EnumerationSpecifications.

Changes to Client SDK

  • No changes.

Changes to Server SDK

  • New: Added flag EndpointServiceRequest.sendServiceFaultsForBadServiceLevelResponses, if true ServiceFaults are returned instead of full responses if service level status is bad. Per UA Specification 1.04 part 4 section 7.30 ServiceFaults should be used in this case. By default the flag is false (keeps existing behaviour), but future SDK version will change it to be by default true (and some future version will remove the flag).

Changes to PubSub SDK

  • New: Added support for encoding array data.

  • New: Added support for RawData option in JSON encoding.

  • New: Added DataSetClassId parameter to PublishedVariableDataSetConf and PubSubEventDataSetConf.

  • Fixed: JSON Payload value is now a JSON object.

  • Fixed: DataSetClassId and PublisherId are now set correctly in JSON encoding.

  • Fixed: MQTT handles now reconnections to the broker

  • Fixed: MQTT closes connections gracefully

  • Fixed: JSON encoding of Network and DataSet Messages is now following the defined JsonNetworkMessageContentMask and DataSetFieldContentMask.

Changes to Code Generator

  • No changes, uses the same as in 4.4.2.

Changes to SampleConsoleClient

  • No changes.

Changes to SampleConsoleServer

  • No changes.

Changes to PubSub samples

  • New: Added command line option to select network interface by name.

  • New: Added command line option to configure server’s port.

  • New: Added command line options for MQTT related settings.

  • Fixed: Samples .bat start script now support arbitrary number of command line parameters.

  • Improved: SamplePubSubPublisherServer and SamplePubSubSubscriberServer refactored to clarify the principles of PubSub configuration


  • Updated httpcore library to version 4.4.13

  • Updated httpclient library to version 4.5.13

  • Updated PubSub tutorial

  • Plus a number of other small changes.

Version 4.5.6

Build: 4.5.6-1429

Release date: 26.05.2021

This release is a bug fix release that also contains performance and security fixes.

As a security fix, this release changes the defaults of Root/Objects/Server/ServerCapabilities/MaxXXXContinuationPoint from 0 (unlimited) to UnsignedShort.MAX_VALUE (65535). Using value of 0 could allow Clients to allocate infinite amount of them resulting in OutOfMemoryError. Earlier releases can mitigate this by changing the limit to a non-0 value via code shown below:

ServerCapabilitiesTypeNode serverCapabilities = server.getAddressSpace().getNodeManagerRoot().getServerData().getServerCapabilitiesNode();

Future SDK versions will investigate the option to use implementations that do not allocate any server-side memory.

In addition, the server side now handles Read service calls a lot faster under certain conditions. As long as no UaTypeIoListener(s) are attached to any TypeIoManagerListener(s) the UaNodes’ references are no longer checked for the HasTypeDefinition reference. This affects all `UaNode-based NodeManagers.

The server side now handles IndexRanges for Read calls as specified in "When reading a value and any of the lower bounds of the indexes is out of range the Server shall return a Bad_IndexRangeNoData. If any of the upper bounds of the indexes is out of range, the Server shall return partial results.". Previously Bad_IndexRangeNoData was incorrectly returned if the end index was out of range.

Changes to Common parts

  • New: Variant.asEnum(EnumerationSpecification).

  • Fixed: JsonEncoder output was wrong in certain conditions.

Changes to Client SDK

  • Fixed: UaClient will now read the MaxNodesPerRead OperationLimit first with a single-operation Read call when connecting.

  • Fixed: UaClient Subscriptions having SubscriptionId of 0 are no longer put to TransferSubscriptions calls.

Changes to Server SDK

  • Security fix: Changed the defaults from 0 for Server/ServerCapabilities/MaxXXXContinuationPoint to UnsignedShort.MAX_VALUE (65535).

  • Fixed: TypeIoManagerListener no longer checks references if there are no UaTypeIoListener attached to it.

  • Fixed: IndexRange for Reads now work per the OPC UA Specification, returning partial data for out of bounds end index.

Changes to PubSub SDK

  • New: PubSubUadpDataSetMessageReceivedEvent.getPublisherId().

Changes to Code Generator

  • No changes, uses the same as in 4.4.2.

Changes to SampleConsoleClient

  • Changed: Using empty array QualifiedName[0] instead of null array for the SimpleAttributeOperand of the EventFilter for the "select the node itself" operation. Empty should be used instead of null and is more interoperable.

Changes to SampleConsoleServer

  • No changes.

Changes to PubSub samples

  • New: SamplePubSubSubscriber also logs the PublisherId when a dataset message is received.


  • Plus a number of other small changes.

Version 4.5.4

Build: 4.5.4-1405

Release date: 18.03.2021

This release is a bug fix release that also contains memory leak fixes and security fixes.

This release now supports IPv6 addresses that have a scope id that has the hyphen ('-') character. Previous releases had several issues (e.g. UaClient could not connect to such address nor UaServer would start). The support is done as a workaround to (i.e. simply we need to avoid using Unless you run in an environment where that is not an issue, we recommend to parse OPC UA addresses with UaAddress instead of However, there is a known issue, that UaAddress.parse wont support non-guarded IPv6 addresses (i.e. that are not using bracket characters '[' and ']' to isolate the host portion of the url). That will be fixed in a future update.

Changes to Common parts

  • Deprecated: SpongyCastleUtils, the BouncyCastle equivalent BouncyCastleUtils class was already deprecated.

  • Deprecated: EventData constructors, call static factory methods instead.

  • New: EventData.raw, EventData.fromNodeHierarchy static factory methods.

  • New: ByteString.from(ByteArrayOutputStream stream) static factory method.

  • New: ByteString.copyTo(OutputStream) and a ByteArrayOutputStream overload of that without the need for exception handling.

  • Fixed: ApplicationIdentity in Android detection was incorrectly using '' system property when using 'java.vendor' was used in other places.

  • Fixed: Support IPv6 addresses that have a scope id that has the hyphen ('-') character.

  • Fixed: Support loading NodeSets that use the Category element (but the data is discarded, as it is modeling-only data).

  • Fixed: When loading a non-codegenerated model, Custom Structure inheriting custom Structure type of the same model missed parent fields sometimes.

  • Fixed: DataTypeConverter could not handle values larger than Long max value when converting String→UInt64 (i.e. to UnsignedLong).

  • Fixed: Privkey constructor that takes in the encoded form (via byte[]) depended on platform Security Provider ordering.

Changes to Client SDK

  • No changes specific to (only) Client side of the SDK.

Changes to Server SDK

  • Security fix: ModifyMonitoredItem didn’t validate that the Session did own that MonitoredItem, now does.

  • Memory Leak fix: SessionManagerListener.onCloseSession was not called for "new Sessions", for which ActivateSession was never called before timeout, could cause a memory leak if SDK users were relying on that call to clean up some session-specific resources.

  • New: Support sendInitialValues FALSE option in TransferSubscription service calls.

  • Fixed: A rare situation, where a earlier KeepAlive message for a Subscription could override a later received Notification.

  • Changed: For performance reasons, the EventData send in Events now by default only checks reference chains of Objects and Variables when determining which event fields are sent, all other NodeClasses are excluded. This can be configured currently via static BaseEventTypeNode.getExcludedsubnodeclasses() method and clearing the set returns previous behavior. In practice the only impact of this is that it is not possible to select Variables below a Method node of an event type, which in normal conditions is not needed. Method nodes are typically shared and thus processing their references can be time consuming.

Changes to PubSub SDK

  • Memory leak Fixed: UDP-UADP chunks were not cleared if message was never completed. Now they are once the last chunk is more than 10s old. This is currently hard-coded, future release may allow configuring this.

  • New: Allow configuring of socket options in PubSubUdpUadpConnectionConf.Builder.putSocketOptions and PubSubUdpUadpConnectionConf.Builder.putDiscoverySocketOptions.

  • Changed: The NetworkInterface parameter in PubSubUdpUadpConnectionConf is now configured instead with StandardSocketOptions.IP_MULTICAST_IF option. Also it must now always be set, if the NetworkAddress parameter is a multicast address.

  • Fixed: UDP-UADP message sending could fail if it consisted of multiple chunks.

  • Fixed: It was not possible to send/receive custom Structures.

  • Fixed: Larger than 1024 bytes UDP messages could fail in Subscriber part.

  • Fixed: Do not listen to discovery messages separately if discovery port equals normal port.

Changes to Code Generator

  • No changes, uses the same as in 4.4.2.

Changes to SampleConsoleClient

  • No changes.

Changes to SampleConsoleServer

  • No changes.

Changes to PubSub samples

  • The NetworkInterface parameter was changed to use the StandardSocketOptions.IP_MULTICAST_IF option.

  • A workaround for selecting a "null" interface was added, though, for multicast addresses you should always select one real interface, otherwise it might not work.


  • Plus a number of other small changes.

Version 4.5.2

Build: 4.5.2-1343

Release date: 25.01.2021

This release is a bug fix release that also contains memory leak fixes. In addition this release adds optional support for SamplingInterval of 0 for MonitoredItems.

Changes to Common parts

  • New: StackUtils, added methods setNonBlockingWorkExecutorThreadPriority, setBlockingWorkExecutorThreadPriority, setAsyncSelectorThreadPriority. Allows changing Thread priorities of the stack layer common pools.

    Should not be called under normal conditions, but might be useful in some more exotic environments. Must be called before other interactions with the SDK.
  • Fixed: Undefined Enumeration values in Structure decoding will now throw DecodingException.

  • Fixed: PkiDirectoryCertificateStore, Cert that were deleted directly via filesystem were not reflected in the returned Sets.

Changes to Client SDK

  • Fixed: EnumerationSpecification.Builder is now reusable.

Changes to Server SDK

  • New: Added support for SamplingInterval of 0 for MonitoredItems. Must be enabled by calling SubscriptionManager.setMinSamplingInterval(0) for UaServer.getSubscriptionManager().

    No filtering is performed when the interval is 0 (e.g. it is possible to receive values from the past if multiple clients are writing to the node at the same time). Clients that previously used 0 will now see different behavior if enabled, since previously the server would have revised the value.
  • Fixed: NPE fix, UaServer can no longer be started with an UserTokenPolicy that has a null UserTokenType (use UserTokenType.Anonymous instead). Preferably only constants from the class UserTokenPolicies should be used.

  • Fixed: ConditionRefresh Method Call related events, RefreshStartEventType and RefreshEndEventType, now contain values for all Mandatory Properties.

  • Fixed: Memory leak that happened each time ConditionRefresh related events were created.

  • Fixed: Memory leak that could have happened on EventQueueOverflowEvent of a MonitoredEventItem.

  • Fixed: Memory leak if a Session, for which no ActivateSession had been called, timed out while Diagnostics were enabled.

Changes to PubSub SDK

  • No changes.

Changes to Code Generator

  • No changes, uses the same as in 4.4.2.

Changes to SampleConsoleClient

  • Changed: .bat scripts for samples now use java+javac directly from PATH (vs. JAVA_HOME previously).

Changes to SampleConsoleServer

  • Changed: .bat scripts for samples now use java+javac directly from PATH (vs. JAVA_HOME previously).

Changes to PubSub samples

  • Changed: .bat scripts for samples now use java+javac directly from PATH (vs. JAVA_HOME previously).


  • Plus a number of other small changes.

Version 4.5.0

Build: 4.5.0-1291

Release date: 02.12.2020

This is a PubSub release of the SDK. In addition, this release contains some security and bug fixes.

It should be noted that this release won’t support address space based configuring of PubSub nor persisting the PubSub configuration. They will be added in a future release. In addition, the UDP-UADP connections won’t support security, that too will be added in a future update.

Changes to Common parts

  • New: ApplicationIdentity.setActualHostName(String) static method, which enables some workarounds that can be used to override SDK’s internal hostname resolution. This should be the fully qualified hostname, if applicable.

  • New: TcpConnection.setExecutorProvider(…​) static method, which enables some workarounds.

  • Fixed: Changed some stderr outputs to be ERROR level logs instead.

  • Changed: The default StackUtils uncaughtExceptionHandler no longer outputs to stderr, now they are only logged on ERROR level.

Changes to Client SDK

  • Security fix: SignatureData was not verified, if incorrect algorithm was specified. Now incorrect algorithm will be logged as an ERROR, but the correct algorithm is tried, since this can be determined from the channel security policy.

  • New: UaClient.validateServiceRequest protected method, which enables some workarounds. It is called before sending any servicerequest related to a Session or done in a context of a Session.

Changes to Server SDK

  • Security fix: SignatureData was not created if using Sign mode for opc.https.

  • Fixed: Incorrect SignatureData algortihm is logged as an ERROR. Note that this is different compared to the client side, as on the server side the correct algorithm from the channel was always used.

Changes to PubSub SDK

  • New: Discovery messages can be sent to the separate Discovery Address in UDP-UADP.

  • New: Added an option to set maximum message sizes for UDP-UADP.

  • Fixed: Some classes were missing from javadocs entirely.

  • Fixed: UDP-UADP sockets were not properly closed during PubSubSystem shutdown.

Changes to Code Generator

  • No changes, uses the same as in 4.4.2.

Changes to SampleConsoleClient

  • Fixed: The helper .sh script uses now ":" instead of ";" for the classpath separator (affected 4.4.0+).

  • Changed: At least for now, accept CA Certificates that do not have a CRL.

Changes to SampleConsoleServer

  • Fixed: The helper .sh script uses now ":" instead of ";" for the classpath separator (affected 4.4.0+).

Changes to PubSub samples

  • Changed: Using separate queue names for UADP/JSON data.

  • Fixed: The helper .sh scripts uses now ":" instead of ";" for the classpath separator (affected 4.4.0+).


  • Plus a number of other small changes.

Version 4.4.2

Build: 4.4.2-1266

Release date: 08.10.2020

This release is a minor release. The base information model NodeSet file has been updated to version 1.04.7, thus models depending on that version should now work. In addition the SDK now contains a workaround for one interoperability problem relating to the AccessRestrictions Attribute added in OPC UA 1.04, where the specification text has a different DataType compared to what the NodeSet file has. As SDK functionality is derived from the NodeSet via our codegen, it uses the wrong type UInt32 instead of UInt16, but now it will also accept UInt16 based data by converting it to UInt32 for the time being.

We did the same edits to the model as in Version 4.2.0, as that issue is not yet fixed by the OPC Foundation. Additionally, any new Method added in this version is not yet implemented out-of-the-box in the server side.

Changes to Common parts

  • New: DefaultCertificateValidator.IgnoredChecks and DefaultCertificateValidator.getIgnoredChecks(), a more robust system for ignoring certain checks.

  • New: DefaultCertificateValidator.IgnoredChecks.IGNORE_KEYUSAGE_CHECKS, option to disable checking X.509 keyUsage field.

  • New: DefaultCertificateValidator validation process checks more keyUsage fields.

  • Deprecated: DefaultCertificateValidator isRevocationListsRequired and setRevocationListsRequired are now deprecated and delegated to the new system as DefaultCertificateValidator.IgnoredChecks.IGNORE_CA_MISSING_CRL.

Changes to Client SDK

  • Fixed: Added a workaround to allow receiving (at least temporarily) both UInt16 and UInt32 values for AccessRestriction Attribute values. Will log on WARN if UInt32 received.

  • Fixed: Setting RequestHeader.Timestamps of GetEndpointRequest and FindServersOnNetworkRequest.

Changes to Server SDK

  • Changed: Using the latest NodeSet2 for the Base OPC UA Information Model 1.04.7.

Changes to PubSub SDK

PubSub parts are still to be considered as beta.
  • Fixed: Usage of KeyFrameCount parameter, added default value of 10.

  • Fixed: Publisher ID type reading when decoding an UADP NetworkMessage.

  • Fixed: Indexing of data was incorrect in sent messages.

Changes to Code Generator

  • New: 1.04.7 standard model support.

  • New: Updated DI + GDS bundled models to latest versions.

Changes to SampleConsoleClient

  • No changes

Changes to SampleConsoleServer

  • New: MyNodeManager, added example of making a custom Structure type in code. Note! We do not (yet) generate a DataTypeDictionary for it, thus only OPC UA 1.04 clients that can handle the new DataTypeDefinition Attribute are able to process the data.


  • Added some additional logging.

Version 4.4.0

Build: 4.4.0-1240

Release date: 06.08.2020

This release is a minor release with some bugfixes, most of which are based on the latest Compliance Test Tool (CTT). In addition we do now build 3 new editions that include our initial (beta) PubSub support.

Changes to Common parts

  • New: Added support for BouncyCastle FIPS edition with some limitations, works by replacing the BC jars with BC fips jars (not bundled). See for more details.

  • Fixed: The "invalid_namepace_index/uri" syntax added in 4.3.0 now works also for UaQualifiedName. The syntax is used if there is no unique mapping for a namespace index to uri. Note that this is still an error by itself, this just mostly allows our client side to deal with servers that have such invalid mapping.

Changes to Client SDK

  • New: Subscription.conditionRefresh(), will call ConditionRefresh standard Method for the Subscription.

  • New: MonitoredEventItem.conditionRefresh(), will call ConditionRefresh2 standard Method for that monitored item.

  • New: Made possible to use custom Sockets (or anything that can be abstracted with InputStream + OutputStream) for opc.tcp via static TcpConnection.setSocketFactory(…​).

  • Changed: Calls to UaClient.connect() after obtaining the initial connection once will now log WARN logs. While the call does nothing if the client is connected, it will interfere with SDK’s automatic reconnecting if the client doesn’t have connection (and if AutoReconnect is false, UaClient.reconnect() should be used instead for manual reconnecting). Note that this only applies until calling UaClient.disconnect(), after which it is fine to call UaClient.connect() to obtain the initial connection again. Will try to fix this better in a future version.

  • Fixed: Client-side OperationLimits were not used if server-side limit reading failed (the OperationLimits.defaults() was used incorrectly).

  • Improvement: Server-side OperationLimits reading will fail now on individual limit level (previously any failures would ignore all server-side limits).

  • Improvement: Added the operation level StatusCode result in DEBUG logs when creating monitored items.

Changes to Server SDK

  • Fixed: Loading custom Structure values that contain custom Enumeration field from a NodeSet2 XML now works (custom Structure fields that are custom Structures still not yet).

  • Fixed: Loading NodeSet2 XML models that had custom Structures that had fields of type BaseDataType and did not specify it (schema default) can now be loaded.

  • Fixed: RejectedSessionCount and SecurityRejectedSessionCount in diagnostics are now incremented when Session is rejected (i.e. when CreateSession or ActivateSession returns a bad StatusCode).

  • Fixed: Generating DataChangeNotifications if a value changed from NaN → NaN (per CTT that is a value change).

  • Fixed: Writes to multidimensional arrays with IndexRange works properly.

  • Fixed: Fixed scenarios where setting an AggregateFilter for monitored items would not work.

  • Fixed: Some standard namespace nodes did missed SourceTimestamp and caused CTT errors.

  • Fixed: FileTypeNode size is now only updated when the WriteHandle to it is closed.

  • Fixed: FileTypeNode handles that are not closed by Session are now closed automatically when the Session is removed.

  • Changed: Made a modification to the 4.3.0 change of not allowing instantiation of MandatoryPlaceholder/OptionalPlaceholder, now they can be instantiated by custom InstantiationStrategies or configuration, but not by default.

  • Changed: Per CTT, returning now Bad_IdentityTokenInvalid instead of Bad_IdentityTokenRejected if a valid and trusted certificate is used together with an empty UserIdentitySignature.

Changes to PubSub SDK

Made 3 new editions that have initial (beta) support for PubSub:

  • prosys-opc-ua-sdk-for-java-VERSION-evaluation

  • prosys-opc-ua-sdk-for-java-VERSION-client-server-pubsub-binary

  • prosys-opc-ua-sdk-for-java-VERSION-client-server-pubsub-source

If you wish to try, for more info.

These editions require Java 8 to run and are still to be considered as beta and have a limited implemented feature set regarding PubSub.

Changes to Code Generator

  • No changes (i.e. bundling same version as 4.3.0 did).

Changes to SampleConsoleClient

  • No changes.

Changes to SampleConsoleServer

  • New: ValueHistory now supports reverse (end-to-start) history reading.

  • Changed: CTT related changes and additions to the StaticData nodes.


  • The maven-integration maven-install-helper converts the javadoc zip to jar (no longer bundled twice) thus the distribution zips are now smaller.

  • The 'lib' folder of the distribution zips now has a folder structure that shows where the dependencies are needed and used.

  • The SDK download page no longer displays dependencies that are only needed by samples.

Version 4.3.0

Build: 4.3.0-1075

Release date: 25.03.2020

This release is a minor release of the SDK. Changes are related to the performance, bugs and security fixes.


  • Security fix: validate CreateSession and ActivateSession Nonces (CVE-2019-19153)

  • Security fix: verify ActivateSession signatures

  • Performance improvements related to the connection speed on the client-side

  • Support to the 'Issuers' certificate store

To detect misbehaving servers the Nonces sent by the server in CreateSession and ActivateSession are now checked for uniqueness and length, which minimum is 32 bytes.

This release contains a fix for a security vulnerability within the UaServer. The signatures related to ActivateSession were not properly checked. See Changes to Server SDK section for more details.

If updating to this SDK version is not an option, we recommend disabling opc.https and user certificate-based authentication.

This version of the SDK significantly reduces the number of service calls needed for connecting and initializing the TypeDictionary. The initialization now packs as many requests to the service calls, as possible reaching the number allowed by the server’s OperationLimits.

The DefaultCertificateValidator now supports a secondary 'issuers' CertificateStore. This feature is needed for cases where a CA certificate cannot directly be trusted, which would mean trusting all certificates that it has signed, but it is still desired to trust an individual certificate signed by the CA. To calculate the chain to the root issuer certificate, those issuer certificates need to be present, but they cannot be placed in the trusted store. The Compliance Test Tool (CTT) also tests certificate chain handling in it’s newest versions.

Changes to Common parts

  • New: UnsignedByte, UnsignedShort, UnsignedInteger and UnsignedLong now have arrayOf static factory methods.

  • New: DefaultCertificateValidator now supports a secondary "issuers" CertificateStore.

  • Changed: NamespaceTable conversion from indexes, that are not in the table, now results in a special "invalid uri" syntax, which will be converted back to the original index when needed. Thus conversion from NodeId to ExpandedNodeId will no longer break if the index is not known. This change also applies to UaNodeId.

  • Changed: DefaultCertificateValidator no longer moves certificates placed in the folder for trusted certificates ('CA/certs') to the folder for rejected certificates ('CA/rejected') when one or more certificate validation tests fail. This type of certificate handling is necessary for passing the compliance tests. Note, that this change has no effect on the error code returned to the client when certificate validation fails.

  • Fixed: A previously missing StructureSpecification Union.SPECIFICATION has been added to EncoderContext set of known StructureSpecifications.

  • Fixed: UaAddress.formatUri now does guard IPv6 addresses with [ ].

Changes to Client SDK

  • New: UaClient.setInitTypeDictionaryAutoUsage(boolean initTypeDictionaryAutoUsage), defaults to false.

  • New: AddressSpace.setRead104Attributes(boolean read104Attributes), defaults to true. This change will be a temporary flag for use-cases where a server fails due to reading new OPC UA 1.04 defined Attributes. It will be deprecated and removed later.

  • Changed: Some PublishRequest sending logic is now logged on TRACE level instead of DEBUG level.

  • Changed: NamespaceTable is refreshed on every UaClient connect and reconnect.

  • Fixed: UaDataTypeImpl no longer throws Bad_AttributeIdInvalid on DataTypeDefinition. Previously, the data was still set, but it did also throw the exception afterwards.

  • Fixed: AddressSpace.getNodes returns timestamps for Value Attributes.

  • Fixed: The "Warning: More than one GeneratedDataTypeDictionary contains the same dictionary" no longer happens on every subsequent UaClient.connect.

  • Improvement: TypeDictionary initializes now with fewer service calls.

  • Improvement: WARN log if UaClient.reconnect is called manually while UaClient.isAutoReconnect is true, as this should not be done and will cause problems.

  • Improvement: Initialization of OperationLimits is now internally done via Read. This initialization was previously done using UaNodes, which also required fetching types for them.

  • Improvement: UaNodeImpl.getComponents now uses less Read and Browse calls.

Changes to Server SDK

  • Fixed: InstanceDeclaration nodes with ModellingRule OptionalPlaceholder and MandatoryPlaceholder are no longer instantiated.

  • Fixed: NPE for 1-namespace nodes that do not have a HasComponent parent node.

  • Fixed: SubscriptionManagerListener.onAfterDeleteMonitoredItem is now properly called when the items were deleted as a part of a Session closing with DeleteSubscriptions set to True.

  • Fixed: Structure values loaded from NodeSet2 models that have a String field with empty value now work.

  • Fixed: Starting a UaServer without a hostname where Java would give localhost as IPv6 address no longer gives "invalid uri" error.

  • Fixed: Server Diagnostics cumulative session counting no longer increases when the diagnostics are toggled off and on.

  • Fixed: Server now checks signatures properly in SessionManager. The lack of proper signature checking affected opc.https using Sign mode for application authentication and both opc.tcp and opc.https using certificate-based user authentication.

  • Improvement: TypeDefinitionBasedNodeBuilderConfiguration.Builder methods now return the builder.

Changes to Code Generator

  • New: Added an option timestampOutputs to the generate configuration XML element, defaults to true. On false disables, the timestamp generation for output files to make better reproducible builds.

  • New: Multidimensional arrays are now supported for Method arguments, as long as they have a fixed ValueRank.

  • Fixed: The names of nodes are now Capitalized for the set/get generation. This fix only affects the models with nodes that do not start with a capital letter, which is the de-facto standard.

  • Fixed: Fallback SymbolicName generation now logs errors if the resulted name is an empty string.

  • Fixed: Incorrect convenience methods for 1-dim array nodes of type UInteger are no longer generated.

  • Fixed: Generated method call logic was incorrect for OptionSetValues UIntegers 1-dim Arguments.

We recommend to regenerate with this version, but it is not required unless you had models that could be affected by the above changes.

Changes to SampleConsoleClient

  • Changed: MyUaClientListener no longer checks nonces, since the connection is already prevented internally earlier.

Changes to SampleConsoleServer

  • New: Added a separate 'issuers' certificate store "PKI/CA/issuers" for application certificates and trusted 'users' certificate store "USERS_PKI/CA" and its 'issuers' certificate store "USERS_PKI/CA/issuers".

  • Fixed: UserAccessLevel, UserExcutable and UserWriteMask Attribute values for some ComplianceNodeManager nodes.

  • Changed: MyUserValidator now does proper user certificate validation with a separate trusted 'users' certificate store and its 'issuers' certificate store.


  • The SimpleServer example now uses all non-deprecated security modes as well.

  • There are now some classes that begin with Internal, e.g. InternalBrowseResults that are designed only for the SDK internal usage. Most of them are not public, but some had to be due to them being needed in cross package calls. The equivalent APIs will eventually be added to the SDK once we know the best way to do so, but for the time being, the APIs of those InternalXXX classes can change at will.

  • Plus many other small changes.

Version 4.2.0

Build: 4.2.0-955

Release date: 11.12.19

This is a minor release of the SDK. Most of the changes are bug fixes and relatively small changes.

This release uses the latest resource files for 1.04 available from the OPC Foundation, thus models relying on Amendments 5,7,11 should now work.

The NodeSet2 file for the Base OPC UA Information Model contains fixes to inconsistencies (NodeSet vs. specification text). Therefore some interfaces we have generated to the SDK from the model have changed. If your model or code depends on these updated types, you will need to update them as well.
The NodeSet2 file included with the SDK is slightly edited to fix a known issue of one Property having incorrect TypeDefinition. For more info see (requires credentials).

Changes to Common parts

  • Security Fix: SecureIdentity.decrypt, added sanity checks for secret length to avoid potential DOS attacks.

  • New: AttributesUtil.getSupportedAttributes(NodeClass).

  • Fixed: AttributesUtil.isValid now works for 1.04 Attributes, additionally fixed some incorrect results.

  • Fixed: The toString of Unions now look similar to other Structures.

  • Changed: Using the latest NodeSet2 for the Base OPC UA Information Model.

  • Changed: Identifiers (and more specific variants e.g. DataTypeIdentifiers) now only contain constants that are part of the current version of the Base OPC UA Information Model (or are needed for the service calls).

  • Removed: ModellingRule.MandatoryShared per Errata 1.04.3 as it didn’t exist.

Changes to Client SDK

  • New: AddressSpace.getNode(…​) also fetches new Attributes that were defined in OPC UA version 1.04. They are currently accessible via UaNode.readAttribute method.

  • Fixed: A potential deadlock if an unknown custom Structure is encountered while decoding ReadResponses.

  • Changed: TypeDictionary now prefers 1.04 DataTypeDefinition Attribute over DataTypeDictionaries where available.

  • Changed: AddressSpace methods getNode and getNodes are no longer synchronized on class level, but instead will lock per node when needed.

Changes to Server SDK

  • Fixed: Bad_TypeMismatch scenario when an empty Structure or Decimal array was written to the server.

  • Deprecated: PredefinedIdPair and ModelParserForUaDefinedTypes. All usages of them were already deprecated (they were used to load the pre-NodeSet era models).

Changes to Code Generator

  • Changed: Updated bundled models to their latest versions.

Changes to SampleConsoleClient

  • No changes.

Changes to SampleConsoleServer

  • No changes.


  • Plus a number of other small changes.

Version 4.1.4

Build: 4.1.4-902

Release date: 28.10.19

This is a bug fix release of the SDK. Also the BouncyCastle dependency is updated to a version which contains a security fix for Additionally there is a new sample, SimpleServer, which is a counterpart for the SimpleClient example.

Changes to Common parts

  • New: ExtensionObject.decode(EncoderContext ctx, Class<T> expectedClass, UnsignedInteger statusCodeOnFailure) throws StatusException overload.

  • Fixed: NodeId.parseNodeId now works for Numeric ids over Integer.MAX_VALUE.

  • Changed: Updated SLF4J dependency to version 1.7.28

  • Changed: Updated BouncyCastle dependency to version 1.64. NOTE! artifactId changed to bcpkix-jdk15to18, please read

  • Changed: Updated Apache HttpComponents and related dependencies versions (httpclient → 4.5.10, httpcore-nio → 4.4.12, httpcore → 4.4.12, commons-codec → 1.11)

  • Deprecated: public static NodeId ID field in the following classes: DataValue, DateTime, DiagnosticsInfo, ExpandedNodeId, LocalizedText, NodeId, QualifiedName, StatusCode, UnsignedByte, UnsignedShort, UnsignedLong, XmlElement. The equivalent constant (noted in the javadocs of the field) in Identifiers (or DataTypeIdentifiers) should be used instead.

  • Deprecated: Static constant NodeId.ZERO, NodeId.NULL should be used instead.

  • Deprecated: Static method NodeId.equals(NodeId, NodeId). ObjectUtils.equals(Object, Object) should be used instead (or on Java 7+ the java.util.Objects.equals can be used). Additionally fixed NPE if the first argument was null.

Changes to Client SDK

  • Fixed: The fallback logic for reading ServerStatus via each individual nodes (Server/ServerStatus/*) now also works if Read returns Bad StatusCode for the Server/ServerStatus node.

Changes to Server SDK

  • Few internal changes, which allows us to do PubSub support in the future.

Changes to Code Generator

  • New: JSON encodings are set for the static field SPECIFICATION (of type StructureSpecification) of each generated Structure (assuming it has JSON encodings defined in the model).

  • Fixed: Possible NPE if a model didn’t contain XML Encodings for Structures.

Changes to SampleConsoleClient

  • Changed: Updated slf4j-log4j12 dependency to version 1.7.28

Changes to SampleConsoleServer

  • Changed: Updated slf4j-log4j12 dependency to version 1.7.28


  • Added new sample: SimpleServer, a counterpart for SimpleClient.

Plus a number of other small changes.

Version 4.1.2

Build: 4.1.2-876

Release date: 09.09.19

This is a bug fix release of the SDK. This release fixes a regression issue of 4.1.0 where a client connection without a certificate was not possible.

Changes to Common parts

  • New: UaNodeId.fromStandard(NodeId nodeId) static factory method, allows easier conversion from 0-NamespaceIndexed NodeIds.

  • Fixed: LocalizedText.toString() returns now empty String instead of null if both Locale and Text parts are null.

Changes to Client SDK

  • Fixed: UaClient connections on SecurityMode.NONE works again without a certificate.

Changes to Server SDK

  • No changes.

Changes to Code Generator

  • No changes.

Changes to SampleConsoleClient

  • No changes.

Changes to SampleConsoleServer

  • No changes.

Version 4.1.0

Build: 4.1.0-868

Release date: 21.08.19

This is a minor release of the SDK. Most of the changes are bugfixes and relatively small changes. Additionally the Codegen can now be run with Java 11.

Changes to Common parts

  • New: TypeDictionary.refresh(), easier refreshing DataTypeDictionaries from the server.

  • New: More helpers for EnumerationSpecification and StructureSpecification generic handling:

    • EnumerationSpecification.toEnumerationBuilder().

    • StructureSpecification.toStructureBuilder().

    • StructureSpecification.getField(String name).

    • StructureSpecification.toBuilder().

  • Improvement: Implemented UaBrowsePath.toString() and UaRelativePath.toString().

  • Improvement: AbstractStructure now contains a generic toString implementation.

  • Fixed: StatusCodes descriptions were cut when ',' was part of the description.

  • Fixed: DataTypeConverter NPEs and erroneous null returns in some cases.

  • Fixed: DataTypeConverter now throws on value overflows and underflows when converting to Int64.

  • Fixed: AccessLevelType.contains(Iterable<AccessLevelType.Fields>) was always returning false. Affected all other option-set types e.g. EventNotifierType and AttributeWriteMask as well.

  • Fixed: PkiDirectoryCertificateStore wont anymore create secondary thumbprint-named file for certs already in the folders.

  • Fixed: PkiDirectoryCertificateStore didn’t initialize revocation lists correctly.

  • Fixed: Saving Cert and PrivKey in PEM format resulted files with incorrect line lengths in some cases.

  • Fixed: IdentifiersDescriptions now works again.

  • Fixed: TypeDictionary initializing now ignores null and empty DataTypeDictionary nodes.

  • Fixed: XmlDecoder.getEnumerationArray now works.

  • Fixed: DynamicStructure encoding problems when it contained DynamicEnumeration arrays.

Changes to Client SDK

  • Improved: UaClient.getEncoderContext() can now be called before UaClient.connect() is called.

  • Fixed: AddressSpace.getNodes(…​) didn’t read 1.04 new Attributes.

Changes to Server SDK

  • Interface Change: Added EventManagerListener.onConditionRefresh2, used to notify calls for the standard method ConditionRefresh2.

  • New: EventManagerRoot, used in NodeManagerRoot. Moved protected refreshXXX methods other than refreshItem and refreshItems to EventManagerRoot.

  • New: EventManagerAdapter, adapter for EventManagerListener.

  • Improved: IoManagerListener.onGetUserExecutable is now checked also before user can execute the Method instead of just providing Attribute value.

  • Fixed: NodeSet2s having larger AccessLevels used for AccessLevelEx now load (but the extra information is discarded).

  • Fixed: Server/ServerStatus/BuildInfo incorrectly had StatusCode 0x00004000 instead of raw Good `StatusCode.

  • Fixed: EventManagerListener onConditionRefresh methods are now called for every EventManager.

  • Deprecated: StructureInfo and StructureInfoCache. StructureSpecification and generic get/set methods of Structure should be used instead.

Changes to Code Generator

  • New: Commandline version outputs the app.home System Property at the start.

  • New: Commandline version, added option to pass and override System Properties via -Dproperty=value flags.

  • New: Generating contains helper methods for "OptionSetValues"-types, e.g. AccessLevelType.contains(AccessLevelType value) and AccessLevelType.contains(AccessLevelType…​ values)

  • Improved: Codegen now works with Java 11+ in addition of Java 8.

  • Changed: Generated toString for Structures uses the implementation via AbstractStructure.

Changes to SampleConsoleClient

  • No changes.

Changes to SampleConsoleServer

  • Fixed: Objects/StaticData/StaticArrayVariables nodes had incorrect TypeDefinition references.


Plus a number of other small changes.

Version 4.0.2

Build: 4.0.2-808

Release date: 02.05.19

This is a bug fix release of the SDK. It additionally contains some new features.

Changes to Common parts

  • New: NodeClass-based Identifiers and Ids-interfaces (e.g. DataTypeIdentifiers, DataTypeIds).

    Identifiers and generated Ids are now interfaces extending these. The changes are source-compatible with 4.0.0, as static constants are inherited. Allows overcoming Java limitations for maximum number of constants as the OPC UA Standard Information Model keeps growing.
  • New: UaRelativePath.from(NamespaceTable namespaceTable, QualifiedName…​ elements) static factory method.

  • New: UaRelativePath.from(UaNamespace namespace, String…​ elementNames) static factory method.

  • New: UaRelativePath.standard(String…​ elementNames) static factory method.

  • New: UaRelativePath.getElements(), can be used to obtain elements of the path.

  • New: UaQualifiedName.from(UaNamespace namespace, String name) static factory method.

  • New: UaQualifiedName.getNamespace(), which will return the namespace as UaNamespace

  • Fixed: Encoding order of DiagnosticInfo fields fixed, order of Locale and LocalizedText fields are swapped. Both are Int32 fields in this case, so binary format itself is unaffected.

  • Fixed: Renamed UnsignedLong.valueof(BigInteger) to valueOf.

  • Fixed: Bad_EncodingError when encoding a DynamicStructure that was inside a Variant.

Changes to Client SDK

  • Fixed: Connections to servers, that do not use an Application Instance Certificate and support only a combination of SecurityMode NONE, UserTokenPolicy Anonymous should now work again.

Changes to Server SDK

  • New: Creating StructureSpecification and EnumerationSpecification dynamically when loading NodeSets.

  • New: Loading custom Structure Values as DynamicStructures where possible when loading NodeSets (if the model is not code-generated).

    Currently only Structures made of known DataTypes work like this. A custom Structure having a custom Structure field does not work yet. We will improve this in the future.
  • Improvement: Avoiding extra encode&decode step when loading the model.

  • Fixed: MonitoredDataItems whose MonitoringMode is changed from Sampling to Reporting should not try to fetch the initial value again.

  • Changed: Loading NodeSets that incorrectly define HasTypeDefinition Reference for VariableType and ObjectType logs a warning instead of failing the loading completely.

  • Changed: Values that cannot be decoded during the NodeSet loading are kept as encoded ExtensionObjects instead of causing the loading to fail completely.

Changes to Code Generator

  • New: Generating NodeClass-based Ids-interfaces, e.g. DataTypeIds.

  • Changed: Generated Ids is now an interface instead of a class and extends all NodeClass-based Ids-interfaces.

Changes to SampleConsoleClient

  • New: -w Command line switch to wait at start until enter is pressed.

    Can be used for attaching a Profiler software before initial SDK classloading takes place.
  • Improved: Avoiding calling deprecated API.

Changes to SampleConsoleServer

  • New: -w Command line switch to wait at start until enter is pressed, same as with SampleConsoleClient.

  • Improved: Avoiding calling deprecated API.

  • Improved: Logging of the simulated alarms.


  • Maven integration project maven-install-helper will also install javadocs in addition of the SDK jar to your local .m2 Maven cache.

Plus a number of other small changes.

Version 4.0.0

Build: 4.0.0-774

Release date: 25.03.19

This is a new major release of the Prosys OPC UA SDK for Java.

The SDK version 4 is based on the OPC UA specification version 1.04. The 4.0.0 release adds support for the most important features, such as new security policies, information models and reverse connections. Other functionality specified in OPC UA 1.04 will be added later on.

Another major change is that the OPC UA Stack is now integrated as part of the SDK.

All users are encouraged to migrate to this new release, although the projects that depend on the OPC UA SDK need to be modified slightly according to the changes. To help you with the transition, we have prepared a Migration Guide that lists the required changes to your applications in detail.

We are proud to be able to provide this big release that will pave the way to reliable OPC UA applications for future needs.

Prosys OPC UA SDK Development Team

Feature Highlights

  • The official name of the product was changed to "Prosys OPC UA SDK for Java" and the names of the SDK jars have changed slightly as well.

  • OPC Foundation Java Stack is integrated as part of the SDK. It includes the OPC Foundation updates to 1.04 plus additional updates to improve the integration.

  • Support for OPC UA 1.04 Information Models.

  • Support for the new 1.04 Attributes in the client side.

  • Support for the new 1.04 DataTypeDefinition Attribute in the server side (support for other new 1.04 Attributes will be added later).

  • Support for the new 1.04 Security Policies: Aes128-Sha256-RsaOaep, Aes256-Sha256-RsaPss.

  • Support for Reverse Connections (using the new 'ReverseHello' message defined in OPC UA 1.04.).

  • Improved support for handling Structure data types in a generic way.

  • Support for Automatic-Module-Name for Java 9+.

  • Support Maven for installation of SDK and samples.

  • Fixed detection of Spongy Castle on Android.

  • Fixed HTTPS communications.

    The OPC UA Servers no longer validate the HTTPS certificates of clients. Therefore, if you have HTTPS enabled on the server, any client application may connect by default. The clients must use MessageSecurityMode Sign to enable authentication using Application Instance Certificates, similar to UA TCP. This behavior is defined in OPC UA Specification Part 6. OPC UA 1.04 also changed the format of HTTPS EndpointUrl to us 'opc.https' instead of 'https'. SDK 4.0 only supports the new format.

Changes to OPC UA Stack

The OPC UA Stack is now integrated as part of the Prosys OPC UA SDK. It is based on the open source OPC Foundation Java Stack, but based on our agreement with the OPC Foundation we can provide it under the Prosys OPC UA SDK license.

As a consequence, there is a new package that includes all classes that were in The OPC Foundation stack has been updated to support OPC UA 1.04 and on top of that we have added some of our own improvements.

Migration to the new stack should in principle only require renaming the package declarations in project source files. See the Migration Guide for more details.

  • New: Support for (most) new types defined in OPC UA 1.04.

  • New: Support for the new ReverseHello message defined in OPC UA 1.04.

  • New: Support for new security policies defined in 1.04

  • New: ReverseConnectionListener.

  • New: SecurityPolicy enum. Includes the new security policies defined in OPC UA 1.04. NOTE that Basic128Rsa15 and Basic256 are now deprecated and they are no longer recommended, except for backwards compatibility.

  • New: SecurityMode.combinations()

  • Removed: SecurityMode constants. Use the new constants in SecurityPolicy instead. ALL is no longer available: use the version specific constants instead.

  • Removed: SunJceCryptoProvider and SunJceCertificateProvider. They were not Java 9+ ready and also not 100% compatible. As a result BouncyCastle (or SpongyCastle in Android) is a mandatory dependency.

  • New: Support multidimensional arrays in Structure types

  • Removed: EncoderCalc.

  • New: LimitedByteArrayOutputStream and SizeCalculationOutputStream. Can be used with BinaryEncoder in situations where EncoderCalc was previously used.

  • New: Added static valueOf(String) method to the unsigned types to match jdk ones.

  • New: Support new 1.04 type Decimal by enable usage of Java BigDecimal in Variant and fields of Structure, for example.

  • New: A Builder class for each Structure.

  • New: EncoderContext.addEnumerationSpecification() and addStructureSpecification()

  • New: Static methods Variant.asObjectArray(Variant…​ variants) and Variant.asVariantArray(Object…​ objects).

  • Fixed: Use NamespaceIndex=0 instead of the UA Standard NamespaceUri for ExpandedNodeIds.

  • Fixed: Names of threads are more descriptive, and they can be configured. See StackUtils class.

  • Fixed: Handling of unknown built-in type IDs.

  • Fixed: Always use SpongyCastle in Android automatically.

  • Fixed: No more warnings from usage of reflection in Java 9+

  • Fixed: Possible memory leak after calling StackUtils.shutdown() and "restarting" the stack.

  • Removed ThreadGroups.

  • Changed: ExtensionObject now uses ByteString instead of byte[].

  • Changed: MultidimensionArrayUtils.toString() does not decode `ExtensionObjects by default.

  • Removed: XXXServiceSetHandler helper interfaces.

  • Deprecated: Constructors of UnsignedXXX types. Use static factory methods (valueOf) instead.

  • Deprecated: Constructor of StatusCode. Use static factory method StatusCode.valueOf instead.

  • Deprecated: Structure.getBinaryEncodeId, getJsonEncodeId, getTypeId & getXmlEncodeId. Use values available from the new Structure.specification() instead.

Changes to SDK common classes

  • New: Support for OPC UA 1.04 types.

  • Removed: Generated code and models for companion specifications (DI, ADI, PLCOpen).

  • Removed: PkiFileBasedCertificateValidator, PkiFileBasedCertificateListener, CertificateValidationListener, DefaultUaCertificateValidator, UaCertificateValidator. These were deprecated in version 3.x.

  • New: AccessLevelType replaces EnumSet<AccessLevel> in UaVariable.getAccessLevel(), etc.

  • New: EventNotifierType replaces EnumSet<EventNotifiedClass> in UaObject.getEventNotifier(), etc.

  • New: AttributeWriteMask replaces EnumSet<WriteAccess> in UaNode.getWriteMask(), etc.

  • Deprecated: Constructors of the UaAddress. Use static factory methods instead.

  • Deprecated: DataTypeConverter.getDataTypeForJavaClass(Class<?> clazz). Use getDataTypesForJavaClass() instead.

  • Deprecated: UaAddressSpace.findNode(). Use getNode() instead.

  • Changed: Append the certificate size to the file name of application instance certificates.

  • Changed: DataTypeConverter throws DataTypeConversionException instead of ServiceResultException.

  • Changed: UaValueNode.getDataType() returns UaDataType instead of UaType

  • Changed: StructureSpecification, FieldSpecification and EnumerationSpecification are now constructed via builders instead of constructors.

  • Fixed: Event types which had Object InstanceDeclarations with Properties now work properly.

  • New: UaNamespace. Used to model an OPC UA Namespace(URI).

  • New overload: UaNodeId.fromLocal(ExpandedNodeId expandedNodeId, NamespaceTable namespaceTable).

  • New: UaNodeId.getValueAsParseForm() and UaNodeId.parse(String namespaceUri, String valueAsParseForm). Can be used to store UaNodeId in files.

  • New: Automatically call registerModel() for generated information models by default.

  • New interface: BitField. All UnsignedXXX types implement this.

  • New: UaDataType.getDataTypeDefinition().

Changes to Client SDK

  • Fixed: Forward references of the Enumeration type.

  • Fixed: BrowseName of Guid type (was GUID)

  • Removed: Methods addChangeListener(), getDataChangeListeners(), hasChangeListener() and removeChangeListener() from MonitoredDataItem. These have been deprecated from 2.x.

  • Removed: UaFolder class. This was already deprecated in version 2.x. FolderType should be used instead.

  • Deprecated: UaClient methods: getHost(), getPort(), getProtocol(), getServerName() and getUri(). Use the respective methods of UaAddress instead.

  • Deprecated: UaClient.setUri(). Use UaClient.setAddress() instead.

  • Deprecated: AddressSpace.findNode(). Use getNode() instead.

  • Changed: Added missing Subscription parameter to SubscriptionNotificationListener.onMissingData

  • Changed: Added errorCode parameter to ServerStatusListener.onStatusChange(). Used, when status is null.

  • Changed: Async methods in AddressSpace and UaClient return the AsyncResult with a generics parameter matching the response type.

  • Changed: TypeDictionary now reads by default the dictionaries when connecting to the server. This can be toggled via Uaclient.setInitTypeDictionaryOnConnect(boolean).

  • New: TypeDictionary.getStructureSpecification(UaNodeId id), which can be used to obtain the StructureSpecification of the given id (type or encoding id).

  • New: TypeDictionary reads the new 1.04 DataTypeDefinition Attributes, if the server provides them.

  • New: UaClient.getAddress().

  • New: UaClient.setConnectTimeout(), can be used to set how long the initial connection (normal or reverse) is waited.

Changes to Server SDK

  • New: UaServer.addReverseConnection(String clientServerEndpointUrl, String endpointUrlForClientConnection). Enables support for Reverse Connections as mentioned in Feature Highlights.

  • New: NodeManagerUaNode.getDataType(NodeId dataTypeId).

  • New: Added support for SecurityMode for HTTPS connections. Note that only MessageSecurityModes None or Sign can be used.

  • New: SubscriptionManager.setMaxMonitoredItemsPerSubscription(int). Default is 1000.

  • Deprecated: UaServer.setSecurityModes(). Use UaServer.getSecurityModes().add() or UaServer.getSecurityModes().addAll() instead.

  • Deprecated: NodeManagerTable.findNode(), use getNode() instead.

  • Deprecated: NodeManager.findNode, use getNode() instead.

  • Changed: UaServer.getSecurityModes() returns a Set instead of an array of SecurityMode.

  • Changed: UaServer.getSecurityModes() is empty by default (used to initialize to `SecurityModes.ALL, which does not exist any more).

  • Changed: Added Boolean useSimpleBounds parameter to HistoryManagerListener.onReadAtTimes call.

  • Changed: InstanceDeclaration interface, methods returning Set<InstanceDeclaration> now return Set<? extends InstanceDeclaration>

  • Removed: InstanceDeclaration.getExternalReferences() and getInstanceReferences()

  • Changed: NodeManagerTable.addNode() now throws IllegalStateException if the the add operation fails.

  • Changed: Using 32 byte authentication tokens for Sessions.

  • Fixed: Symmetric ReferenceTypes now work properly.

  • Fixed: Possible multithreading issue in protected method SubscriptionManager.nextSubscriptionId()

  • Fixed: An issue where Diagnostics didn’t work if they were enabled before UaServer.start was called.

Changes to Code Generator

Running the code generator requires now (exactly) Java 8. A future version will also run on Java 11. The generated code will however compile on Java 6+.

  • Changed: Configuration file format. Please see the Codegen Manual and Migration Guide for details.

  • Changed: Namespace prefix is now applied also to the names of the generated DataTypeDictionaryHelper and Serializer output classes.

  • New: Support OPC UA 1.04 information models.

    OPC Foundation is releasing new amendments to the 1.04 specification. Specific companion specifications may rely on these amendments, so if you experience problems, please contact our support for assistance.
  • New: A static SPECIFICATION field is generated for each Structure. It contains the respective StructureSpecification.

  • New: A static SPECIFICATION field is generated for each Enumeration. It contains the respective EnumerationSpecification.

  • New: Generate code for subtypes of unsigned integer types that have OptionSetValues Property.

  • New: Support for multidimensional array fields for Structures (added in 1.04).

  • New: Support abstract Enumeration in InstanceDeclaration DataTypes (will return Enumeration in generated code).

  • New Generation Targets: client_model_provider and server_model_provider. UaClient and UaServer will be able to call registerModel automatically for these models (assuming the generated files are accessible via the classpath).

  • New: Detecting if an information model is used improperly as configuration file and reporting better error message.

Changes to SampleConsoleClient

  • New: Command line switch '-r' to open a port for reverse connection.

  • New: Added pom.xml for Maven integration.

  • Changed: Project layout to Maven Standard Directory Layout.

  • Changed: Removed generation of HTTPS certificate (not required).

Changes to SampleConsoleServer

  • New: Support new security policies defined in 1.04.

  • New: Support reverse connection.

  • New: Added pom.xml for Maven integration.

  • Changed: Project layout to Maven Standard Directory Layout.

  • Removed MyEnumType enum, converted the functionality to use EnumerationSpecification.

  • Fixed: Avoids NPE for the first read of NonUaNodeComplianceNodeManager.


  • For Maven users, A pom.xml for maven integration is now provided for the SDK jar. Addtionally the samples have their own pom.xml which should allow easier importing to IDEs. Note that you must first install the SDK pom file (with the jar) to your local .m2 repo, otherwise the pom.xml of the samples do not work.

  • For Java 9+ support, the SDK jar now includes Automatic-Module-Name in the MANIFEST.MF with value ''

  • Fixed DataTypeDictionary related Description node names for the SampleTypes model, which is bundled with the SDK Codegen.

  • Android detection should work better, for the purpose of automatically detecting if SpongyCastle based Crypto/Certificate providers should be used.

  • HTML manuals included in the distribution in addition to PDFs.

Plus a number of other small changes.