cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Task remote execution

FeofilovIvan
1-Newbie

Task remote execution

How to use com.infoengine.au.NamingService java class without ie.properties file?
I whant use NamingService for remote invoke InfoEngine task from applet, anybody know how I can do this?
As temporary solution I use this code in applet:
FileWorker f = new FileWorker("ie.properties");
f.openForWrite();
f.addLine("seeAlso=ldap://cn=Manager:pwd@host/cn=configuration,cn=Windchill_9.0,o=ptc");
f.addLine("host.namingService.directoryProvider=ldap://cn=Manager:pwd@w9.elm.ru");
f.addLine("host.Windchill.secret.text=mySecret");
f.addLine("host.Windchill.secret.text2=mySecret");
f.close();

And use generated file in constructor:
NamingService namingService = NamingService.newInstance(
"host.namingService", "ie.properties");

3 REPLIES 3

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.

<h3>May I fogot something?
</h3>


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

Top Tags