Hi,
I am a newbie in Lapi. I have used sample code to access contents in a personal/enterprise workspace using LAPI.
However, when i try to run status = documents.AccessPersonalWS(pwsInfo), I receive an LLIOException with "Server did not accept open request." as error description.
With lot of search on google, Opentext knowledge center and tek-tips.com, I came across adding and changing timeout parameter in [sockserv] section in opentext.ini file. But, it also didnt resolved the issue.
Here, is the sample code that I am using.
public class AddDeleteDocument {
public static void main(String[] args) {
try {
LLSession session = null;
LAPI_DOCUMENTS documents = null;
int status = 0;
int nodeID = 0;
int parentID = 0;
int nodeVol = 0;
int parentVol = 0;
/*
LLValue pwsInfo = (new LLValue()).setAssocNotSet();
LLValue objInfo = (new LLValue()).setAssocNotSet();
LLValue versionInfo = (new LLValue()).setAssocNotSet();
*/
LLValue pwsInfo = new LLValue();
LLValue objInfo = new LLValue();
LLValue versionInfo = new LLValue();
// Instantiate session object
session = new LLSession("localhost", 8181, "LivelinkDB",
"Admin", "adminpwd", null);
// Instantiate documents object
documents = new LAPI_DOCUMENTS(session);
// Access the user's Personal Workspace
status = documents.AccessPersonalWS(pwsInfo);
if (status == 0) {
System.out.println("Accessed Personal Workspace");
parentVol = pwsInfo.toInteger("VolumeID");
parentID = pwsInfo.toInteger("ID");
}else{
System.out.println("Unable to access workspace.");
System.exit(0);
}
catch (Throwable e) {
// Display exception
System.err.println("Application encountered an exception:");
System.err.println(e.getMessage());
e.printStackTrace(System.err);
}
}
}
And, here is the error I am getting:
Application encountered an exception:
Server did not accept open request
com.opentext.api.LLIOException: Server did not accept open request
at com.opentext.api.LLConnectRouter.receiveOpenResponse(Unknown Source)
at com.opentext.api.LLConnect.executeTraditional(Unknown Source)
at com.opentext.api.LLConnect.execute(Unknown Source)
at com.opentext.api.LAPI_DOCUMENTS.AccessPersonalWS(Unknown Source)
at com.livelink.opentext.AddDeleteDocument.main(AddDeleteDocument.java:37)
Any help will be appreciable.
Thanks in adv.