Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hi Ivan,
You can use the following lines (see IEUsersGuide.pdf)
NamingService namingService = NamingService.newInstance("com.myCompany.namingService", "ldap://ldap.mycompany.com/dc=myCompany,dc=com");
The solution you have choosen is not completely safe because your connection login and password are downloaded on the client side and can be visible (after decompiling the applet java code).
Regards
Julien
Thanks Julien Boulay. I know IEUserGuide.
I try to use:
NamingService namingService = NamingService.newInstance(
"ru.elm.w9.namingService", "ldap://cn=Manager:password@w9.elm.ru/dc=w9,dc=elm,dc=ru,cn=configuration,cn=Windchill_9.0,o=ptc");
And have exception "IEUnauthorizedException: request is not trusted (no validation information)"
But with this constructor NamingService.newInstance("ru.elm.w9.namingService", "ie.properties");
all work fine.
I execute task via this code
IeService ie = new IeService();
ie.setCredentials("orgadmin", "password");
ie.setEnableExceptions(true);
try {
Task task = new Task(query);
task.setUsername("orgadmin");
task.addParam(ref, obid);
task.setService(ie);
task.addProcessor("ru.elm.w9.Windchill");
task.invoke();
return task.getGroup(group);
} catch (IEException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
2010-04-27 15:15:31,820 [Thread-4] DEBUG com.infoengine.object.RoundRobinLoadBalancer - ptcServiceName=ru.elm.w9.Windchill:18002,dc=w9,dc=elm,dc=ru,cn=configuration,cn=Windchill_9.0,o=ptc
2010-04-27 15:15:31,820 [Thread-4] DEBUG com.infoengine.object.RoundRobinLoadBalancer - ptcServiceName=ru.elm.w9.Windchill,dc=w9,dc=elm,dc=ru,cn=configuration,cn=Windchill_9.0,o=ptc
(com.infoengine.util.IEResource/68) com.infoengine.exception.fatal.IEUnauthorizedException: request is not trusted (no validation information)
2010-04-27 15:15:32,148 [Thread-4] DEBUG com.infoengine.object.RoundRobinLoadBalancer - ptcServiceName=ru.elm.w9.Windchill:18002,dc=w9,dc=elm,dc=ru,cn=configuration,cn=Windchill_9.0,o=ptc
at com.infoengine.object.factory.Request.validateSignature(Request.java:679)
at com.infoengine.object.factory.Request.validateSignature(Request.java:752)
at com.infoengine.au.SocketAccess$SocketThread.validateSignatures(SocketAccess.java:1545)
at com.infoengine.au.SocketAccess$SocketThread.run(SocketAccess.java:1196)
(com.infoengine.util.IEResource/68) com.infoengine.exception.fatal.IEUnauthorizedException: request is not trusted (no validation information)
at com.infoengine.object.factory.Request.validateSignature(Request.java:679)
at com.infoengine.object.factory.Request.validateSignature(Request.java:752)
at com.infoengine.au.SocketAccess$SocketThread.validateSignatures(SocketAccess.java:1545)
at com.infoengine.au.SocketAccess$SocketThread.run(SocketAccess.java:1196)
java.lang.NullPointerException
at ext.elm.report.data.DataBuilder.trailByList(DataBuilder.java:296)
at ext.elm.report.data.JusperDataSourceVedomost.<init>(JusperDataSourceVedomost.java:59)
at ext.elm.report.applet.AppletAction$1MyThread.run(AppletAction.java:208)
I got interesting message on email about problem solver.
1. untrusted client communicates to trusted client on server side
(Authenticates in windchill)- sends request for info
2. server side trusted client receives message/authenticates, and passes
request to windchill Beast
3. windchill Beast processes request and gives back to trusted client
4. Trusted client passes info to back original untrusted client
So agin in short:
Start -> Ivan Remote client -> Trusted client on Server-> Windchill ->
Trusted client on Server -> Ivan Remote Client -> Stop
While what you are doing:
1. untrusted client tries to Comunictaed with Windchill Beast
2. Windchill says - you are not trusted - reject
Start -> Ivan Remote client -> Windchill (reject) -> Ivan Remote client ->
Stop