TomBarrand
Programmer
Hi,
I am using the Livelink API's to connect to Livelink via Java. I have written a simple class that calls the LLSession method. It doesn't look like my call is even getting to the Livelink server.
I have installed the Livelink API program on the server and have added the bin directory to the LAPI stuff on my class path on my laptop where I am writing the code from.
Please can some who has used Java and LAPI explain what I am missing?
I have detailed my code below
Thanks
Tom
-----------------------------------------------------------
//Specify import directives
import com.opentext.api.*;
public class CreateNewLLSession
{
//class member functions
public static void main (String args[]) throws Exception
{
try
{
//Create a new Livelink Session
LLSession session;
session = new LLSession ("10.10.0.88", 2099, "", "Admin", "livelink", null);
//Initialize any LAPI Objects
LAPI_USERS user = new LAPI_USERS(session);
System.out.println("Status Code: " + session.getStatus());
System.out.println("Api Error: " + session.getApiError());
System.out.println("Error Message: " + session.getErrMsg());
System.out.println("Status Message: " + session.getStatusMessage());
//////////////////////////////////////////////////////////////////////
//Code to Update a User's Info
//////////////////////////////////////////////////////////////////////
//Define the user's login name
//String userName = "kward";
//////////////////////////////////////////////////////////////////////
}
catch (Throwable e)
{
System.err.println(e.getMessage());
e.printStackTrace(System.err);
}
}
//This function outputs any errors from the session
public static void GetErrors(LLSession session)
{
System.out.println("Status Code: " + session.getStatus());
System.out.println("Api Error: " + session.getApiError());
System.out.println("Error Message: " + session.getErrMsg());
System.out.println("Status Message: " + session.getStatusMessage());
}
}
I am using the Livelink API's to connect to Livelink via Java. I have written a simple class that calls the LLSession method. It doesn't look like my call is even getting to the Livelink server.
I have installed the Livelink API program on the server and have added the bin directory to the LAPI stuff on my class path on my laptop where I am writing the code from.
Please can some who has used Java and LAPI explain what I am missing?
I have detailed my code below
Thanks
Tom
-----------------------------------------------------------
//Specify import directives
import com.opentext.api.*;
public class CreateNewLLSession
{
//class member functions
public static void main (String args[]) throws Exception
{
try
{
//Create a new Livelink Session
LLSession session;
session = new LLSession ("10.10.0.88", 2099, "", "Admin", "livelink", null);
//Initialize any LAPI Objects
LAPI_USERS user = new LAPI_USERS(session);
System.out.println("Status Code: " + session.getStatus());
System.out.println("Api Error: " + session.getApiError());
System.out.println("Error Message: " + session.getErrMsg());
System.out.println("Status Message: " + session.getStatusMessage());
//////////////////////////////////////////////////////////////////////
//Code to Update a User's Info
//////////////////////////////////////////////////////////////////////
//Define the user's login name
//String userName = "kward";
//////////////////////////////////////////////////////////////////////
}
catch (Throwable e)
{
System.err.println(e.getMessage());
e.printStackTrace(System.err);
}
}
//This function outputs any errors from the session
public static void GetErrors(LLSession session)
{
System.out.println("Status Code: " + session.getStatus());
System.out.println("Api Error: " + session.getApiError());
System.out.println("Error Message: " + session.getErrMsg());
System.out.println("Status Message: " + session.getStatusMessage());
}
}