this is my first post, so I apologize if I make some mistakes. I'm using Utgard opc Da Java library to connect to an opc da server. What I've noticed is that in order to connect to the server, username and password are required. Instead, using c#, only url is necessary. Since at work we use only Java, is there any possibility to avoid inserting username and password? That's because the application will be installed into multiples pc in which we won't know any user credentials. Sorry for my bad English, Any help would be really appreciated. Thanks In advance to everyone
So, I thought that it was something that could be solved in a short time. However, here what I'm trying to do:
private final static String host = "localhost";
private final static String domain = "localhost";
private final static String user = "ramserver1";
private final static String password = "ramserver1";
private final static String clsid = "FAFA7034-4C37-401E-BA8E-7162DB0AC278";
private final static String progId = "ThermoElectron.RESULTOPCServerDA.2";
private ConnectionInformation connectionInformation;
private Server server;
public String readValue;
public Group group;
public OpcConnection() throws JIException, UnknownHostException,
NotConnectedException, DuplicateGroupException {
this.connectionInformation = new ConnectionInformation();
this.connectionInformation.setClsid(clsid);
this.connectionInformation.setDomain(domain);
this.connectionInformation.setHost(host);
this.connectionInformation.setUser(user);
this.connectionInformation.setPassword(password);
server = new Server(this.connectionInformation,
Executors.newSingleThreadScheduledExecutor());
}
Basically, I've created a class OpcConnection: in the constructor, I initialize the parameters needed for the connection. I would like to delete lines in which I set user and password. Regarding security, I've set Authentication level to none, like this: Authentication level
What I'm missing?
Utgard is a opensource implementation of DCOM(over JInterop) calls to OPC server, and because it work not in Windows security context, it can't use windows authentication to make DCOM calls. Therefore you should provide windows user credentials explicitly. Also by my experience implementation of DCOM by Utgard(JInterop) does not conforms all standards, and should be used carefully with production OPC servers.