JLink - access to session from webservice
Hi all,
I'm having some issues with my JLink application (java API - synchronous)
The idea is to start a webservice from this JLink application, so we can easily access our ProE session from another application / website.
I have created the following class:
public class CreoWebService {
static Session curSession;
String startDirectory;
public CreoWebService(Session session)
{
//setting current session and getting working directory from this session
curSession = session;
startDirectory = curSession.GetCurrentDirectory();
//starting webservice
String address = "http://127.0.0.1:8023/ShapeWebService";
CreoWebServiceDef wsDef = new CreoWebServiceDef();
Endpoint endpoint = Endpoint.publish(address, wsDef);
}
@WebService
public class CreoWebServiceDef {
@WebMethod
public void test(){
System.out.print(startDirectory);
System.out.print(curSession.GetCurrentDirectory());
}
}
}
This seems to work fine, until I try to access the ProE session from the webservice.
The first line from 'test()' is executed correctly when the webservice is called. startDirectory was set when starting the webservice and could access 'curSession' without any problem.
Second line however (in green) fails. No exception or anything, it seems to be blocked while trying to execute this line.
At that point ProE is still working ok. When trying to close it, it crashes (not responding).
While closing down, the second line is executed right before crashing.
So if I understand correctly, my webservice can not access the active ProE session... Am I doing something wrong or trying to do something impossible? All suggestions are welcome, I'm running out of ideas 

