Topic RSS7:57, EEST
Moderators
February 11, 2020
Offline10:08, EEST
Moderators
February 11, 2020
OfflineHello,
The UaAddress.validate method actually checks if a valid UaAddress could be parsed from a given String. For example, “something” can be parsed to “opc.tcp://something:4840”, which is a valid address. In a sense the method doesn’t actually validate whether or not the input String is a valid UaAddress, but whether or not the output of UaAddress.parse(String address) would be a valid UaAddress.
Is this method sufficient for your needs or would you need a method that takes a String as its input and determines without adding anything to it whether or not the String is a valid OPC UA URI?
13:27, EEST
Moderators
February 11, 2020
OfflineHello,
We’re considering adding such validation method to the SDK in future. In the meantime, you can validate that the OPC UA URI contains the following parts:
1. The identifier of a TransportProtocol, e.g.g “opc.tcp” for OPC UA TCP, followed by”://”
2. Hostname or IP address of the Server
3. “:” followed by the number of the port used by the Server
4. “/” followed by the Server Name
For example, “opc.tcp://MyHostName:12345/OPCUA/MyServer” is a valid OPC UA URI.
Validating identifiers of transport protocols is tricky, since new ones can be added to the specification in future. Instead, I would just check that the identifier belongs to any of the TransportProtocols supported by your application, which are probably OPC UA TCP and/or OPC UA HTTPS since you’re using the Prosys OPC UA SDK for Java.
1 Guest(s)

Log In
Register