Georges ATTALI
New Member
Members
Forum Posts: 1
Member Since:
08/19/2020
08/19/2020
Offline
Hello,
I would like to write values to my OPCUA server from client, but I don't understand well the use of RequestHeader and its authenticationToken.
I haven't been able to find examples in Java.
The code I wrote until now is :
public EnvoyerValeursACapsem (WriteValue[] tWriteValue) {// comment renseigner AuthenticationToken ???// NodeId authenticationToken = Identifiers.RootFolder;NodeId authenticationToken = null;RequestHeader requestHeader= new RequestHeader(authenticationToken // NodeId AuthenticationToken, null // DateTime Timestamp, null // UnsignedInteger RequestHandle, null // UnsignedInteger ReturnDiagnostics, null // String AuditEntryId, null // UnsignedInteger TimeoutHint, null); // ExtensionObject AdditionalHeaderWriteRequest writeRequest = new WriteRequest(requestHeader, tWriteValue);try {WriteResponse response = mSession.Write(writeRequest);}catch (Exception e) {// manage exception ...}
Help please ! Is that correct ? What should I use as authenticationToken ? Many Thanks.
Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 32
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855