7:57, EEST
Moderators
February 11, 2020
10:08, EEST
Moderators
February 11, 2020
Hello,
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
Hello,
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.
Most Users Ever Online: 1919
Currently Online:
18 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 727
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1