Version 2.3.2

2.3.2 (in old release notes format)

This is a service release of the SDK.

It includes a number of fixes related to the OPC Foundation Compliance Tests. Also due to stack fixes, the following now works for NodeSet2 XMLs:

  • TypeDictionaries are loaded completely (GH#66) @
  • Loading custom Structure values from the XML

OPC Foundation Java Stack changes

  • Version 1.02.337.18
  • Fixed: Channel management regarding to CLOSE_WAIT problem (finalizing the fix started in 1.02.337.12)
  • Fixed GH#56: XMLDecoder.get(String fieldName, Class clazz) => custom Structure values should now load correctly from NodeSet XMLs
  • Ported GH#66, XMlDecoder.getContentAsString() should now parse all characters => ByteStrings are loaded completely => TypeDictionaries should work in client side
  • Fixed GH#77: EncoderUtils should now encode correctly an array of Structures as a Structure field
  • Fixed: HTTPS endpoint is added to the GetEndpointsResponse even when queried via opc.tcp

Changes to both SDK Client and Server

  • Changed: LocaleId DataType is bound to java String instead of Locale.

Changes to SDK Client

  • Fixed: UaClient was not calling PublishRequest after reconnect
  • Fixed: Bad_NoSubscription warning after last subscription removed.
  • Fixed: UaClient initializes now the ApplicationDescription of ServerIdentity from GetEndpointResponse instead of CreateSessionResponse, which may be null according to the latest specifications

Changes to SDK Server

  • New: The ServerStatus.CurrentTime updates once per second automatically. This is done in a SDK worker thread(pool) in UaServer instance.
  • Fixed: NPE in NodeManagerUaNode, if AddReferences Service was called with null NodeId

Samples

  • No changes

Code generator

  • No changes, keeping version 2.2.4
Plus a number of other small fixes
@ GH# refers to issues in the OPC Foundation GitHub, which is updated separately for 1.03 stack releases
08.06.17

Version 2.3.0

2.3.0 (in old release notes format)

This is a new minor release of the SDK.

It includes a number of fixes related to the OPC Foundation Compliance Tests. The main fix is to have proper support for Diagnostics. The automatic Compliance Test Tool has a bug that the 'Base Info Diagnostics' Conformance Unit is not selected when 'Standard UA Server' Profile is selected. These tests are now required to pass certification and the SDK is now supporting the diagnostics properly as well.

The C++ SDK is nowadays limiting the number of PublishRequests that it accepts from the client applications (10 by default), and this version of the SDK is adjusted to automatically tune the number of requests as necessary. Also the Java SDK defines a default limit of 100 for the requests

Also this version contains an updated Java Stack, which contains a fix for the long lasting issue of server socket going to CLOSE_WAIT state in some rare circumstances and staying there.

OPC Foundation Java Stack changes

  • Version 1.02.337.12
  • Fixed: Situation where the server socket can go and stay at CLOSE_WAIT state

Changes to SDK Client

  • New: Dynamically reacting to Bad_TooManyPublishRequest error. The number of PublishRequests to send to the server is automatically decremented if server reports it receives too many PublishRequests.
  • New: UaClient.getPublishRequestSetpoint() is providing the current number of PublishRequests to send, which is automatically calculated as before (based on getPublishRequestFactor() and number of Subscriptions), if not set.
  • New: UaClient.setPublishRequestSetpoint can be used to set the above number of PublishRequests also manually if desired.
  • Fixed: Do not send PublishRequests if we have only timed out subscriptions (causes continuous Bad_NoSubscription errors from the server).
  • Fixed: Subscription.isTimeout() was not reset when the subscription is removed from the client (or added again), disabling the subscription to be used again in practice.

Changes to SDK Server

  • New/Fixed: DiagnosticsManager class. Handles support for Diagnostics.
  • Deprecated: Methods in diagnostics related XXXTypeNode classes, as the DiagnosticsManager now sets the values directly
  • New: SubscriptionManager.get/setMaxPublishRequestCount()
  • Changed: RegisterServer service call must not be implemented in the internal DiscoveryServer of UaServer
  • Fixed: NPE at Session.setLocaleIds()
  • Fixed: SessionManager, returning Bad_IdentityTokenInvalid if null user token policy is defined (CTT Security User X509, 008.js)

Samples

  • New: SampleConsoleServer example on user authentication using certificates. They are put to a 'USERS_PKI' folder which will be next to the 'PKI' folder.

Code generator

  • No changes, keeping version 2.2.4
Plus a number of other small fixes
18.04.17

Version 2.2.6

2.2.6 (in old release notes format)

This is a new bug fix release of the SDK.

OPC Foundation Java Stack changes

  • No changes from 2.2.4, using Build 1.02.337.10

Changes to both SDK Client and Server

  • Fixed: Improved documentation of UaNode.addComponent and removeComponent

Changes to SDK Client

  • Fixed: UaClient failed to connect if the serverCertificate of the selected server endpoint was null (NPE)
  • Fixed: NPE in Subscription.onPublishResponse, if PublishResponse.availableSequenceNumbers is null
  • Fixed: EndpointUrl was not defined for OpenSecureChannel calls related to UaClient.discoverEndpoints (interoperability with some servers)

Changes to SDK Server

  • Fixed: Republish call now resets the lifetime counter of the subscription
  • Fixed: DiscoveryServer registration sets DiscoveryUrls
  • Fixed: Possible multithreading related NPE in Subscription.getAvailableSequenceNumbers
  • Fixed: Diagnostics CurrentMonitoredItemCount, added underflow check
  • Fixed: Validate decrypted password length before using it to allocate an array for the password (avoids OutOfMemory errors if the decryption fails to provide the correct length)
  • Fixed: RegisterServer response sets response header (for CTT)
  • Fixed: Enable custom user token policies to be defined in the server (for example, to enable unencrypted passwords)

Samples

  • Changed: SampleConsoleClient defines the SessionName using the local hostname

Code generator

  • No changes, keeping version 2.2.4

30.11.16

Version 2.2.4

2.2.4 (in old release notes format)

This is a new bug fix release of the SDK.

OPC Foundation Java Stack changes

  • Build 1.02.337.10
  • Do not verify the certificate field between CreateSessionResponse and GetEndpoints (interop. change in spec. 1.02)

Changes to both SDK Client and Server

  • New: ApplicationIdentity.getActualHostNameWithoutDomain()
  • New: Auto-convert 'hostname' to the above in ApplicationUri
  • Fixed: Handling of incorrect private key passwords for HTTPS certificates

Changes to SDK Client

  • Fixed: The latestAvailableSequenceNumberCombination is now cleared when Subscription.reset() is called.
  • Fixed: Added null check in Subscription.updateAvailableSequenceNumbers in order to support certain servers
  • Fixed: MonitoredItem ClientHandle generation is now thread safe
  • Fixed: Invalid sequence number issue in subscriptions during reconnect
  • Fixed: If serverCertificate in Endpoint is null or empty, use serverCertificate from session.
  • also added more logging

Changes to SDK Server

  • Fixed: The list passed to NodeManagerListener.onGetReferences is now modifiable.
  • Fixed (partial): ServiceManagerBase.arrayDimensionsMatch checks ValueRank > 0 correctly, but ignores arrayDimensions still.
  • Fixed: Calculate serverSignature in CreateSession only when both clientCertificate and clientNonce is specified
  • Fixed: Limited FileTypeNode length of read() buffer to MaxByteStringLength of the server's EndpointConfiguration

Samples

  • Fixed: SampleConsoleClient historyReadRaw uses now larger numValuesPerNode (1->1000)
  • Fixed: MyHistorian, added null check to onReadProcessed method
  • Fixed (doc): Explicitly mention using stepped interpolation in ValueHistory.getValue

Code generator

  • Some minor improvements
Plus a number of other small fixes
05.10.16

Version 2.2.2

2.2.2 (in old release notes format)

This is a new bug fix release of the SDK.

One of the main changes is in handling timeouts of Publish Requests, which was a new feature added to version 2.2.0.

On the server side, the request timeout is now properly checked based on the retrieval time of the request - instead of the send time from client (avoiding the effect of clock difference).

On the client side the default timeout is reset to UnsignedInteger.MAX_VALUE - in normal cases the requests will fail if the connection is reset - and only if the responses are supposed to get lost, it is necessary to use a timeout for the requests. If the timeout is used, it must not conflict with the keep alive times, so it should be aligned with the subscription parameters.

Also the encoding and decoding of structures has been improved - especially related to code generation, so you may need to regenerate the structure types, if you have modeled them yourself.

OPC Foundation Java Stack changes

  • Build 1.02.337.8
  • New: XMLFactoryCache, caches XML parsing related factories
  • Fixed (Github #1): DateTime.parseDateTime typo fixed
  • Fixed (Github #2): CloseSecureChannelRequest should be sent with CLOF header
  • Fixed (Github #30): Proper shutdown for blocking work executor's rejectionhandler
  • New: IEncoder.put() & EncoderUtils.put() overloads with Class argument
  • Fixed (Mantis 3149): Private keys encrypted with passwords containing non-ASCII characters cannot be loaded
  • Fixed (Mantis 3139): sendPendingMessagesRunnable should not run in parallel
  • Changed: TIMEOUT_TOLERANCE (constant 10%) for client side - extra time to wait before defining a request has timed out
  • Changed: Generating cert with SUN JCE, to use subject names as plain string instead of CertificateIssuerName object.

Changes to both SDK Client and Server

  • New: UaAddress.toString
  • New: Subscription.getItem returns MonitoredItem instead of MonitoredItemBase
  • Fixed: Removed dependency to log4j that was still present in some classes

Changes to SDK Client

  • New: MonitoredItem.getExpandedNodeId() and constructors with ExpandedNodeId instead of NodeId: will be converted on the fly, when the client is connected and needs to use the Ids.
  • New: AddressSpace.browse() overloads with ExpandedNodeId
  • Fixed: PublishRequest timeout was calculated too early
  • Fixed: Possible NPE in Subscription
  • Fixed: AddressSpace.addNode must check the operation result
  • Fixed: AddressSpace.getType throws now AddressSpaceException instead of ClassCastException if given NodeId is not for an UA type
  • Fixed: Maximum RequestHandle was 65535, new is unsigned integer maximum value
  • Fixed: Details in the publish response handling
  • Changed: UaClient.getSupportedModes does not anymore check endpointUrl
  • Changed: PublishRequest default timeout (back) to UnsignedInteger.MAX_VALUE
  • Changed: Include StatusCodes.Bad_SessionNotActivated to the communication error list

Changes to SDK Server

  • INTERFACE CHANGE: NodeManagerListener.onCreateMonitoredDataItem, added NodeId parameter
  • New: ServerNode.addOrganizes
  • New: NodeMapUaNode.getNodes()
  • New: ServerRedundancySupport value initialized to None instead of Null
  • New: Allow user created Session objects by overriding SessionManager.provideSession()
  • Fixed: Mandatory InstanceDeclarations not instantiated on Java 8
  • Fixed: Possible memory leak related to subscription diagnostics
  • Fixed: Possible problemns with keepalive if changing publishinterval
  • Fixed: Ua Methods allowed arrays when expecting scalar value
  • Fixed: Reject timeouted PublishRequests with Bad_Timeout
  • Fixed: Use server side timestamp for publishrequest timeout calculation
  • Fixed: Unnecessary keep-alive messages from the server subscriptions
  • Fixed: ServiceException instead of StatusException when trying to AddNodes service and it has been disabled from the server
  • Fixed: Check byte array length of read values, when using index ranges in IoManager
  • Changed: Faster NodeSet XML reading

Code generator

  • Version 2.2.2 (Mainly the templates have been updated)
  • Fixed: NPE for calling non instantiated Optional Methods
  • Fixed: Encoding Structure with Null field

Other

  • The tutorial PDFs have now bookmarks

Plus a number of other small fixes


25.02.16

Version 2.2.0

2.2.0 (in old release notes format)

This is a new minor release of the SDK. The release contains several library updates, including a major update to the OPC UA Java Stack.

Client side reconnection procedure has also been improved and it should now work more reliably with subscription recovery.

The release contains several interface changes, so it may require minor modifications to the applications using the SDK as well.

OPC Foundation Java Stack changes

  • Build 1.02.337.4
  • Changed: Security framework reworked. Again, enables usage of Bouncy Castle natively, without JCE, in practice enabling 256 bit security witout installing the JCE Unlimited Strength Jurisdiction Policy Files. See README.txt for details
  • Bouncy Castle libraries updated to version 1.52
  • Spongy Castle libraries updated to version 1.52
  • Support for HTTP Core version 4.3 and 4.4 added (but due to some issues encountered with the latest libraries, 4.2 kept as the default version provided with the SDK)
  • Interoperability of Basic256Sha256 and Structure encoding towards other stacks has been improved
  • Several minor fixes included

Changes to both SDK Client and Server

  • New: interface UaValueNode; common base type for UaVariable & UaVariableType
  • New: UaAddress.validate()
  • New: PkiFileBasedCertificateValidator.refresh()
  • Fixed: PkiFileBasedCertificateValidator.clear(boolean removeFiles) always removed files
  • Changed: UaMethod.getInputArguments & getOutputArguments to return an empty array instead of null, when the value is null
  • Changed: UaAddress internal parsing is based on custom parser instead of URI, providing more complete validation.
  • Changed: UaAddress will use the default protocol (opc.tcp) and port (4840/4843) if none is provided in the URI string
  • Changed: UaAddress.getServerName() and UaClient.getServerName() does not contain the '/' prefix any more
  • New: ApplicationIdentity will now replace 'localhost' in ApplicationName with the actual hostname, similar to what is done for ApplicationUri
  • Fixed: ModelParser can now read the value field for custom Structure types from XML files - although they cannot be decoded and will be kept as ExtensionObject

Changes to SDK Client

  • INTERFACE CHANGE: New method, SubscriptionAliveListener.onAfterCreate()
  • INTERFACE CHANGE: Return type changed, UaClient.callAsync returns AsyncResult instead of AsyncResult (see also the respective codegen change)
  • New: SubscriptionAliveAdapter
  • New: SubscriptionNotificationAdapter
  • New: UaClient.historyReadAsync & historyUpdateAsync
  • New: UaClient.set/isValidateDiscoveredEndpoints() to enable disabling the enpoint verification between GetEndpoints and CreateSession (a problem sometimes with some servers)
  • Changed: UaClient.PublishRequestTimeout is now 120000 (2 minutes) by default
  • Fixed: UaClient.reconnect() will now properly call Republish to the subscriptions before starting to handle other publish responses and recreates the subscriptions if they have timed out in the server
  • Fixed: NullPointerException in Subscription notification data handling at some "unusual" situations
  • Fixed: Keep alive messages were still acknowledged for some servers, although it was supposed to be fixed in the previous release.

Changes to SDK Server

  • INTERFACE CHANGES: NodeManager.getVariableType(), IoManager.readValue(), IoManager.writeValue(), IoManagerListener.onReadValue(), IoManagerListener.onWriteValue(): type of variable parameter changed to UaValueNode (from UaVariable)
  • Fixed: IoManager.readValue was not called for VariableType nodes (fixed with the above restructuring)
  • New: PublishRequest timeouts are now handled

Changes to Sample applications

  • SampleConsoleClient prompting for connection URI, if no command line argument is given, is clarified
  • ApplicationName of SampleConsoleServer & SampleConsoleClient now includes the computer name (defined with '@localhost' in the source)

Code generator

  • New: The codegen will now generate Async versions of all methods.
  • New: The codegen generates equals() & hashCode() for Structure types
Plus a number of other small fixes
13.07.15

Version 2.1.2

2.1.2 (in old release notes format)

This is a new bug fix release of the SDK. Interoperability regarding Structure data and the new Basic256Sha256 security policy is improved.

Note that Basic256Sha256 is not enabled in the server by default. You can use SecurityMode.ALL_102 instead of SecurityMode.ALL to enable this. Several client applications may still get confused of the new policy, though.

OPC Foundation Java Stack changes

  • Build 1.02.336.12
  • New: Enable omitting the endpointUrl check between GetEndpoints and CreateSession by not providing the discoveredEndpoints for the createSession call.
  • Fixed: Encoding and decoding Structures in Structures is not working against C/.NET Stack
  • Fixed: Interoperability with Basic256Sha256 tested against C/.NET Stack
  • Fixed: Do not break that badly, if structure type is not decodable.
  • Fixed: Decoding of enumeration types
  • Changed: ExtensionObject now accepts null byte[] as parameter

Changes to both SDK Client and Server

  • Fixed: ModerParser errors now show approx. line number where the error occurs

Changes to SDK Client

  • New: UaClient.set/isValidateDiscoveredEndpoints()
  • Fixed: Do not acknowledge alive notifications (generated extra warning on server side)
  • Fixed: createSubscriptions() will be recalled for failed subscriptions, if it fails in connect/reconnect (theoretically may happen).
  • Fixed: Added additional checks to reading server status. If all fields of ServerStatus are null, then we read the elements individually. This should prevent NPE if server sends invalid structure back.
  • Fixed: PublishResponseQueue handling could be sleeping every now and then, although new data had been received.

Changes to SDK Server

  • New: NodeManager.isInitialized() & isStarted() (fields 'initialized' & 'started' are still protected, but will be changed to private in future)
  • Fixed: UserIdentity: Do not try to decrypt user password with other keys, if it already succeeded with one key
  • Fixed: ServerDiagnosticsSummary should now provide the correct data
  • Fixed: Rare NPE in SessionManager, when UserTokenIdentity=null
  • Fixed: EventManager.extractUserEventId() did not extract the correct bytes
  • Fixed: GetMonitoredItems allowed only for the session that owns the subscription.
  • Fixed: ServerStatus.CurrentTime was not updating
  • Fixed: The security mode was not validated against the used Secure Channel (the check must be done in CreateSession, since it may not be done in OpenSecureChannel ((to always enable GetEndpoints)))

Code generator

  • Version 2.1.2
  • Fixed: Class hierarchy for Structure types was not generated
Plus a number of other small fixes
07.05.15

Version 2.1.0

2.1.0 (in old release notes format)

This is a new minor release of the SDK, which fixes several issues in the implementation. This is also the first version that passes the OPC Foundation Compliance Tests and is Certified for Compliance. In practice, it means that the sample applications that are included with the SDK are being certified. It does not mean that all applications built with the SDK are automatically certified, though. But all the features in the SDK now enable certification and all applications built with the SDK should be certifiable.

There is one major change to the use of libraries: logging of the Java Stack and the SDK is now based on SLF4J (Simple Logging Facade for Java), instead of of LOG4J. Since SLF4J is just a facade to various logging libraries, you can continue using LOG4J as the actual logging library and it is still shipped with the SDK and used by the sample applications. Check the readme.txt and the slf4j home page for details on the usage of SLF4J.

OPC Foundation Java Stack changes

  • Build 1.02.336.8
  • New library dependencies: slf4j-api (and optionally slf4j-log4j12 or some other logging bridge)
  • New: ServerSecureChannel.getLocalCertificate()
  • New: ServerSecureChannel.getRemoteCertificate()
  • New: DateTime.is/setUseLocalTimeInToString()
  • New: QualifiedName.isNullOrEmpty()
  • Changed: ObjectUtils.printObjectIds & showDataType default changed to false to give prettier printing by default; showByteDataAsHex=true by default
  • Changed: AsyncResult to a Generic class - and serviceRequestAsync changed to return AsyncResult
  • Fixed: XmlElement.toString() to not throw exception, if the XmlElement is not XML at all
  • Fixed: StatusCode.getName() to provide a name for plain "BAD" as well
  • Fixed: EndpointDiscoveryService.onGetEndpoints() only handles endpoints bound to the interface from whichthe GetEndpointsRequest is coming from.
  • Fixed: Client requires server to use ProtocolVersion=0 - should accept bigger values
  • Fixed: let encodedRemoteCertificate from server to be an empty byte array

Changes to both SDK Client and Server

  • New: UaAddressSpace.loadModel(InputStream)
  • New: UaAddressSpace.getDataTypeConverter() (replaces NodeManagerRoot.getDataTypeConverter(), which was only managing types from the standard namespace)
  • Fixed: ModelParser improvements

Changes to SDK Client

  • New: UaClient.removeSubscriptionAsync
  • New: UaClientListener
  • New: MonitoredDataItem constructor alternatives
  • Fixed (METHOD RENAME): UaClient.setSessionTimeout(long, TimeUnit), was setSesstionTimeout
  • Fixed: AddressSpace.getType() must not throw StatusException (since getNode() does not throw it either any more)
  • Improved: PublishRequest/Response handling & createSubscription

Changes to SDK Server

Fixed several issues related to instantiation of code generated nodes, especially to condition type nodes - and optional members.

  • New (INTERFACE CHANGE): SubscriptionManagerListener.onModifySubscription
  • New: UaServer.is/setEnableIPv6() (default false); on Windows this requires Java 7 or newer
  • New: BrowsePath.toArray(), getLast(), removeLast()
  • New: UaAddressSpace.getDataTypeConverter() (replaces NodeManagerRoot.getDataTypeConverter(), which was only managing types from the standard namespace)
  • New: NodeManagerTable.getType()
  • Changed (Internal interface change!): IoManager.readValue/readNonValue/writeValue/writeNonValue() have a new argument, operationContext
  • Fixed: Inverse references missing from all condition type components (and other reference targets)
  • Fixed: Null values in array data caused NullPointerExceptions in checkDeadband()
  • Fixed: Manual additions of modelchanges were ignored (+added optimization to SematicChanges as well)
  • Fixed: Initialization of TwoStateVariableTypeNode.value
  • Fixed: GeneralModelChangeEventTypeNode did not deliver Changes in the order they are added
  • Fixed: Server initialization fails (with NPE), if ServerName=null or empty
  • Fixed: NPE in GeneralModelChangeEventTypeNode.setChanges()/addChanges()
  • Fixed: Correct error codes are now returned for invalid username/password/algorithm. Client specified algorithm was not supported at all.
  • Fixed: StackOverflowError from modifyMonitoredItems()
  • Fixed: UaServer.init() now throws UaServerException if no UserTokenPolicies are defined
  • Fixed: Server diagnostics were not working at all (since 2.0). Diagnostic data arrays are still not working, though.
  • Fixed: UaVariableNode.setValue() no longer checks whether the SourceTimestamp is changed
  • Fixed: ServerCapabilities.MaxArray/StringLength are now initialized from UaServer's EndpointConfiguration
  • Fixed: ServerCapabilities.ModellingRules are now intialized with all available ModellingRules
  • Fixed: SessionManager accepted user identity tokens, even when the respective type (for example Anonymous) was not supported by the server
  • Fixed: BaseObject/VariableType classes did not contain the TypeDefinitionId annotation, making them unusable with the NodeBuilder

Changes to the Sample applications

  • New: SimpleClient.java
  • New: SampleConsoleServer.sendEvent()
  • Changed: SampleConsoleClient.showReadValueDataType (determines if the DataType of all values read from the server) is now false by default, but can be changed with a cmd line option (-dt)
  • Fixed: SampleConsoleClient expected event fields from SampleConsoleServer
  • Fixed: SampleConsoleClient.getCurrentNodeAsString() to use the provided node, instead of the nodeId field

29.01.15

Version 2.0.2

2.0.2 (in old release notes format)

This is a new service release of the SDK, which fixes several issues in the implementation.

OPC Foundation Java Stack changes

  • Build 1.02.335.7
  • Fixed: Possible NPE in Objectutils.appendObjectAsString()
  • Fixed: XmlElement.toString() in case the value is not XML
  • Fixed: StatusCode.getName() to return value also for BAD (used to return an empty string)
  • Fixed: CloseSecureChannel was never called when connections were closed - and incidentally caused an extra 1 second delay in channel disconnection.

Changes to both SDK Client and Server

  • INTERFACE ADDITION!: UaNodeFactory added public Class getClassType(NodeClass nodeClass, NodeId typeDefinition) method
  • Fixed: SubscriptionBase, priority (higher number means higher priority)
  • Changed: LocalizedTextMap: use LocalizedText.Null instead of throwing an exception for null values
  • Updated: Tutorial to use MonitoredDataItem.setDataChangeListener instead of addDataChangeListener

Changes to SDK Client

  • New: readSizeValue method in FileTypeImpl
  • Added: timeoutDetectionFactor option to Subscription, can be used to give servers more time to send keep-alive in Subscriptions before they timeout
  • Fixed: Do not register UaFolder type (which is now deprecated) - it will inhibit the generated FolderType to be used in AddressSpace.getNode()
  • Fixed: AddressSpace.getNode removed obsolete StatusException throw
  • Fixed: UaClientNodeFactory could not use protected constructors in generated classes: using the generated classes failed
  • Fixed: Optional nodes in generated classes threw exceptions if not initialized. Changed to retun null instead
  • Fixed: HttpSettings in UaClient are stored in internal field, avoid initializing the client too early (certificate could be missing)
  • Fixed: UaClient.get/setTimeout() default value changed from 0 to null/-1. Timeout of 0 means no timeout, i.e. should wait indefinitely, whereas null/-1 instructs to use the stack default.

Changes to SDK Server

  • New: NodeManagerAdapter, provides adapter pattern to NodeManagerListener
  • New: protected field 'started' in NodeManager (set to true after start() method finishes)
  • New: ServerNode.set/getAddNotifierReferencesToServerObject()
  • New: FileNodeManager.set/isAllowWrite() (default=false)
  • New: MonitoredEventItem, send EventQueueOverflowEventType if the event queue overflows, SourceName of EventQueueOverflowEventType is "Internal/EventQueueOverflow"; RefreshEvents are no longer filtered
  • Updated javadoc: ReflectiveVariable
  • Changed: NodeManagerRoot: the internal standard UA model loading will stop on first failure instead of continuing
  • Changed: FileTypeNode, has now NodeVersion property
  • Changed: NodeBuilder should not add HasNotifier references from type nodes to Server, or copy GeneratesEvent references from types to instances
  • Fixed: Details in subscriptions
  • Fixed: Details in FileNodeManager and FileFolderType
  • Fixed: Details in event triggering
  • Fixed: Possible deadlock when a value was updating at the same time a monitored item was created for it
  • Fixed: UaVariableNode, setting DataType when creating the node handles correctly
  • Fixed: NodeManagerUaNode, creates NodeDeleted model change events
  • Added: FileNodeManager, support for client-side uploads
  • Fixed: Subscription, keepalive should trigger more correctly; subscription is re-added to publish queue if its parameters (e.g. priority) changes
  • Fixed: BaseEventTypeNode, always send an event just once and always send to source and server, do not trigger events for null nodes
  • Fixed: ServerTypeNode, ServiceLevel initialized to 255, Auditing to false (both were null), AccessLevel is now read only
  • Fixed: GeneralModelChangeEvent, has changes instead of null, should not receive duplicate events
  • Fixed: SemanticsChangeEvent, has changes instead of null
  • Fixed: AlarmConditionTypeNode & AcknowledgeableConditionTypeNode: initialize Optional node values only if they are present
  • Fixed: AcknowledgeableConditionTypeNode: Usage of optional ConfirmedState made conditional in setAcked and setConfirmed
  • Fixed: AlarmConditionTypeNode: Optional ShelvingState guarded
  • Fixed: Initialization of State fields in generated ConditionType nodes
  • Fixed: possible NPE in MonitoredDataItem, when queue is null
  • Fixed: Sampling enabled in MonitoredDataItem when publishing is disabled
  • Fixed: EventId added to RefreshStartEvent and RefreshEndEvent
  • Fixed: Package path in ReadmeSample.md codegen documentation
  • Updated: Generated interfaces have method names as constants

Changes to the Sample applications

  • Fixed: Possible NPE in SampleConsoleServer if invalid action is selected from the menu

17.09.14

Version 2.0.0

2.0.0 (in old release notes format)

This is a new major release of the SDK, which contains several major changes and new features. Existing applications built against SDK 1.x will require modification work to get compiled with this new version. See below for migration notes.

Feature Highlights

  • OPC Foundation Java Stack 1.02
  • HTTPS protocol
  • New SecurityPolicy: Basic256Sha256
  • More flexible security library usage (Bouncy Castle/Spongy Castle(for Android)/Sun JCE)
  • Standard OPC UA types as (generated) Java classes both on the client and server side
  • Option to use types for companion specifications (DI, ADI, PLCopen)
  • Code generator for enabling usage of custom types, both on the server and client side
  • Support for OPC UA File Transfer (FileType)
  • Enables disabling SecurityMode.None in the server
  • Enables disabling the internal discovery server
  • Enables binding the server to network interfaces independent of the EndpointUrls

New features

The SDK is based on the new 1.02 version of the Java Stack. This conforms to the OPC UA 1.02 specifications.

Main new features of the stack are support for HTTPS protocol and SecurityProfile.BASIC256SHA256 security profile. The stack also enables alternative security libraries, instead of the fixed Bouncy Castle. This was done using standard Java APIs (JCE) instead of Bouncy Castle's API (meaning Bouncy Castle is now just another security provider).

The stack is now using the standard Java Cryptography Extension (JCE) framework for enabling the selection of security library that is used (via SecurityProvider). The main consequence is that since the standard security policy in the JCE allows a maximum of 128-bit encryption algorithms, you must install the "JCE Unlimited Strength Jurisdiction Policy Files" into the JRE to enable 256- bit security. The downloads are available for JRE6, JRE7 and JRE8.

The SDK has also been taken through the Compliance Test Tool and it passes all the tests except for a few cases. We will continue improving the compliance still to get a fully compliant SDK.

The SDK now includes a code generation tool which generates Java classes from types defined in NodeSet2.xml files. The generated code contains getters and setters for child variables and objects. Methods can be implemented and called. Custom structures and enumerations can be used. Generated code can be used on both client- and server-side, although only getters are implemented on the client-side.

New types include the FileType, which enables File Transfer over OPC UA. The SDK introduces a FileNodeManager and FileSyncClient for working with those. See the Server Tutorial for more about that.

Migration Guide

See the Migration Guide for more information on how to accommodate your applications to the new SDK.

The tutorials have also been updated to reflect current functionality.

OPC Foundation Java Stack changes

  • Build 1.02.335.6
  • New: Support for certificates bigger than 2048 bits (work in progress)
  • New: CertificateUtils.createIssuerCertificate()
  • New: CertificateUtils.getApplicationUriOfCertificate()
  • New: SecurityProfile.BASIC256SHA256 (requires big certificates)
  • New: SecurityAlgorithm, replacing old SecurityConstants
  • New: equals() and hasCode() generated to Structure types
  • New: ExpandedNode(uri,value) constructor (assuming serverIndex=0)
  • New: ObjectUtils.equals(left, right)
  • New: valueOf(int[]), valueOf(Integer[]), valueOf(UnsignedInteger[]) for all Enumeration types
  • New: LocalizedText(string) constructor (assumin NO_LOCALE)
  • New: IEncoder.put(), IDecoder.get, EncoderUtils
  • New: DataValue.clone()
  • New protocol: HTTPS
  • Fixed: GetEndpoints request handled even if SecurityMode.None is not enabled in the server
  • Changed: Security reworked to make Bouncy Castle an optional security library to use.
  • Changed: Server side implementation reworked also affecting the binary communications (should be compatible with the old one, though)
  • Changed: NumericRange supports several dimensions
  • Changed: ExpandedNodeId used in places where NodeId was previously used. In addition, EncoderContext is required in some methods. The EncoderContext object is available from Server and Client objects.
  • Changed: XmlDecoder.setNamespaceTable() to enable mapping of namespace indexes between XmlElements and the target system
  • Changed: Refactored HttpsServerSecureChannel to inherit from AbstractServerSecureChannel
  • Fixed: Do not check the securityMode when opening the channel - to enable only secure endpoints used for actual connections (since GetEndpoints must be performed over an insecure channel, anyway)
  • Fixed: Do not use namespace to calculate ExpandedNodeId.hashCode() - since the same namespace will give different hashCodes depending on which is used
  • Fixed: CryptoUtil.asymmEncrypt() did not use the correct transformation - failing with 256 bit user password encryption.
  • Fixed: Use createNonce() with the symmetricEncryptionAlgorithm, instead of asymmetric, in OpenSecureChannel
  • Plus a lot of other minor changes
Known issues: Interoperability with the .NET and C stack is still work in progress, especially regarding the HTTPS protocol and SecurityProfile.BASIC256SHA256

Library Changes

The stack is now depending on more libraries. You can include them in your application as you need them:

  • Changed: bc is Bouncy Castle security library, which is updated to v1.47, but is now optional, although still recommended. The Sun sceurity implementation is used (when available), if Bouncy Castle is not included.
  • New: sc is Spongy Castle, which is only needed for Android applications
  • New: http is Apache HTTP Core, which is only needed to support the HTTPS protocol
  • New: commons-logging is only used by the Apache HTTP Core classes
  • Unchanged: log4j is necessary for SDK & stack internal logging

Changes to both SDK Client and Server

  • Changed: UaApplication.Protocol.Opc renamed to OpcTcp
  • Changed: AddressSpace.getNode() no longer throws StatusException
  • Changed: UaClient.getNamespaceTable() and getServerTable() no longer throw exceptions
  • Changed: PkiFileBasedCertificateValidator returns Bad_SecurityChecksFailed instead of Bad_CertificateUntrusted (according to CTT requirements)
  • Changed (thrown exception change): DataTypeConverter.convert() to throw ServiceResultException instead of ClassCastException.
  • New + Interface Change!: UaNode.getAddressSpace(): returns UaAddressSpace of the node
  • New + Interface Change!: UaVariable.addDataChangeListener(DataChangeListener), UaVariable.removeDataChangeListener(DataChangeListener) (not implemented on client-side yet)
  • New + Interface Change: UaVariable.setValue(Object)
  • New: UaApplication.getSdkVersion(), replacing getVersion()
  • New: UaApplication.getAddressSpace()
  • Removed: PkiFileBasedCertificateValidator.getApplicationUriOfCertificate() - use CertificateUtils.getApplicationUriOfCertificate() instead
  • New: UaApplication.Protocol.Https
  • New: UaApplication.Protocol.getTransportProfileUri()
  • New: ApplicationIdentity.set/getHttpsCertificate
  • New: ApplicationIdentity.getCertificates
  • New: ApplicationIdentity.loadOrCreateHttpsCertificate()
  • New: ApplicationIdentity.loadOrCreateIssuerCertificate()
  • New: ApplicationIdentity.loadOrCreateCertificate() with a new overload
  • New: ValueRank.toString()
  • New: UaAddressSpace, a common inteface of UA address space viewed from server and client side. Both AddressSpace and NodeManagerTable implement this
  • New: UaApplication.getAddressSpace()
  • New: UaApplication.registerModel(CodegenModel): registers a generated information model
  • New: UaApplication.getEncoderContext(): returns EncoderContext of the application
  • New: UaServer.registerAndLoadModel(CodegenModel, URI): registers a generated information model and loads the respective Nodeset XML
  • New: AddressSpace.getNode(NodeId, Class)
  • Fixed: DataTypeConverter.convert to UnsignedByte threw exceptions for values > 128

Changes to SDK Client

  • Changed: MonitoredDataItem.setDataChangeFilter() & MonitoredEventItem.setEventFilter() to throw ServiceException instead of StatusException
  • New: MonitoredDataItem.set/getDataChangeListener() replacing the former add/removeChangeListener(), etc. which are now deprecated (but work for one listener)
  • New: MonitoredEventItem.set/getEventListener() replacing the former add/removeEventListener(), etc. which are now deprecated (but work for one listener)
  • New: UaClient.get/setHttpsSecurityPolicies()
  • New: UaClient.get/setHttpsHostnameVerifier()
  • New: UaClient.setEndpoint()
  • New: UaClient.discoverEndpoints(Protocol...)
  • New: Subscription.setPublishingInterval(long,TimeUnit)
  • New: MonitoredDataItem.setSamplingInterval(long,TimeUnit)
  • New: FileSyncClient
  • New: New overloads to UaClient.readXxx & writeXxx
  • New: UaClient.getOperationLimits()
  • New: Subscription.getSetMaxMonitoredItemsPerCall()
  • Fixed: UaClient.setUserIdentity no longer return the old identity in use, if it fails
  • Fixed: UaClient ServerState will change to Unknown if re-activation (impersonation) fails
  • Fixed: AddressSpace.readReferences to remove node's references that have been removed from the server.

Changes to SDK Server

  • Moved: static methods BaseEventType.createEventId() createFullEventId() and extractUserEventId() to EventManager
  • Removed: All standard node implementations in com.prosysopc.ua.server.nodes.opcua package removed
  • Interface Change!: NodeManagerListener.onDeleteReference(); parameter list changed to include NodeId and UaNode of each (source, target, referenceType)
  • New + Interface Change!: HistoryManager.begin/endHistoryRead() & begin/endHistoryUpdate() and the signatures of all specific methods changed
  • New + Interface Change!: HistoryManagerListener.begin/endHistoryRead() & begin/endHistoryUpdate() and the signatures of all specific methods changed
  • New + Interface Change!: SessionManagerListener.onActivateSessionError() & onAfterActivateSession()
  • New + Interface Change!: UserValidator.onValidationError()
  • New + Interface Change!: abstract NodeManager.getNodeClass(NodeId)
  • New + Interface Change!: UaServerListener.onRegisterServer()
  • New + Interface Change!: NodeManagerListener.onGetReferences(NodeId, UaNode, List)
  • New + Interface Change!: UaServer.getAddressSpace() replacing getNodeManagerTable()
  • Interface Change!: NodeManager.getNodeClass(ExpandedNodeId) is no longer abstract
  • New: NodeManagerTable.getNodeClass(NodeId)
  • Changed: EventType and FireEventMethod have been moved to com.prosysopc.ua.server.nodes.
  • Changed: Default implementation of NodeManager.deleteNode and NodeManager.deleteReference to use findNodes for the params, and not throw an exception (Bad_NotImplemented)
  • Changed: NodeManagerTable to call deleteReference to the node manager of target node as well, if different than the one that owns the source node
  • Changed: ServerNode stores references internally in a HashSet instead of ArrayList
  • New: UaServer.get/setHttpsPort()
  • New: UaServer.get/setHttpsSecurityPolicies()
  • New: UaServer.get/setHttpsWorkerThreadCount()
  • New: UaServer.get/setEndpointConfiguration()
  • New: UaServer.get/setBindAddresses()
  • New: UaServer.get/setBindAddresses(Protocol)
  • New: UaServer.get/setServerName(Protocol)
  • New: UaServer.getHttpsUris()
  • New: IoManager.begin/endRead & begin/endWrite
  • New: ServerUserIdentity, which is also used as parameter instead of UserIdentity in the server side
  • New: FileNodeManager
  • New: FileFolderType
  • New: ServerNode.addNewReference() - fast implementation without checks
  • New: BrowsePath
  • Fixed: UserIdentity.decryptPassword tries to use all certificates of the ApplicationIdentity to decrypt
  • Fixed: ServiceHandler.validateRequest will check for inactive sessions
  • Fixed: The DiscoveryUrls of the application are updated to the ApplicationDescription
  • Fixed: IoManager.readAttribute; Executable, AccessLevel & WriteMask are used to "retain" User-specific values
  • Fixed: Server node attribute fields changed to volatile to inhibit possible threading clashes
  • Fixed: CacheVariable initialValue changed to a new DataValue() to inhibit changes
  • Fixed: UaVariableNode initializes the DataType to BaseDataType (to ensure it's never null)
  • Deprecated: UaServer.is/setUseLocalhost() (use BindAddresses)
  • Deprecated: UaServer.is/setUseAllIpAddresses() (use BindAddresses)
  • Deprecated: UaServer.is/setHostName() (use BindAddresses)
  • Deprecated: UaServer.is/setCanonicalHostName() (use BindAddresses)

Code Generation

The code generator is found from the codegen directory. See the accompanying Readme.md (and/or Tutorial) for instructions on how to use it. The SDK now contains generated Java classes for the UA standard types in the Java package com.prosysopc.ua.types The old types in com.prosysopc.ua.server.nodes.opcua have been removed from use as they are not directly compatible with the new SDK architecture. (If you need them, make a request)

Server Type Instantiation

The generated types are used with the NodeBuilder, which can be used in context of a NodeManagerUaNode

  • New: NodeManagerUaNode.createInstance(NodeId, String)
  • New: NodeManagerUaNode.createInstance(Class, String)
  • New: NodeManagerUaNode.createNodeBuilder(NodeId)
  • New: NodeManagerUaNode.createNodeBuilder(Class)
  • New: NodeBuilder
  • New: NodeBuilderException
  • New: NodeBuilderConfiguration, DefaultNodeBuilderConfiguration, CreateAllNodeBuilderConfiguration, JoinedNodeBuilderConfiguration
  • New: UaInstantiationException
  • New: InvalidTypeNodeException
  • New: InstanceNodeIdFactory
  • New: InstanceNodeIdFactoryImpl
  • New: BrowsePath
  • New: InstanceDeclarationHierarchy
  • New: InstanceDeclarationSet
  • New: TemporaryInstanceDeclaration
  • New: TemporaryTypeNodeInstanceDeclaration
  • New: InstanceDeclaration
  • New: InstanceDeclarationImpl
  • New: TypeNodeInstanceDeclaration
  • New: ModelledInstanceDeclaration
  • New: ReferenceDeclaration
  • New: InstanceReferenceDeclaration
  • New: InternalReferenceDeclaration
  • New: ExternalReferenceDeclaration
  • New: ModellingRule
  • New: UaNodeUtils
  • New: GeneratedNode

Changes to the Sample applications

  • New: SampleConsoleClient.discoverEndpoints()
  • New: SampleConsoleServer: MyEnumType and the respective UA nodes
  • New: SampleConsoleServer.initialize() to include sample code, how to create the HTTPS certificate, signed by a self-created issuerCertificate
  • New: SampleConsoleServer.initialize() to include sample code (commented out), how toinitialize the server with two application instance certificates and to use an issuerCertificate
  • New: SampleConsoleServer.loadInformationModels, which enables loading of the DI,ADI & PLCopen information models from the respective XML files (disabled by default)
  • New: SampleConsoleServer.createFileNodeManager()
  • Changed: SampleConsoleServer.MyEventType
  • Changed: SampleConsoleClient: display used SecurityPolicy, instead of the requested (which may be different when discovering the endpoint)
  • Changed: Show usage of AnalogItemType on the client side etc.

09.07.14