Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to Correctly Use LAPI_DOCUMENTS.GetURLAddress(...)

Status
Not open for further replies.

Edirim

Programmer
Aug 5, 2014
3
US
Hello, All! I am trying to acquire an URL from Livelink using the LAPI_DOCUMENTS.GetURLAddress(...) method in JAVA. I am using the return (status) to test if it's equal to '0' as it is. It seems the connection and session object are correct. However, the returning LLValue, which I am expecting to have been populated with a URL is populated with a 'TargetURL=?' instead. The following is the code snippet of what I am doing. I would greatly appreciate if you could please let me know why my LLValue is populated incorrectly, and I am not receiving the URL as I need it.

String livelinkServer = "url";
int livelinkPort = "port";
String livelinkId = "id";
String livelinkPassword = "password";
int livelinkStatus=0;
int volumeId=0;
int objectId= "objId";

LLSession llsession = new LLSession(livelinkServer, livelinkPort, "", livelinkId, livelinkPassword, null);
LAPI_DOCUMENTS lapiDocuments = new LAPI_DOCUMENTS(llsession);
LLValue livelinkValue = new LLValue();
livelinkStatus = lapiDocuments.GetURLAddress(volumeId,objectId,livelinkValue);

if(livelinkStatus==0)
{
System.out.println("'livelinkValue.toString()' is [" + livelinkValue.toString() + "]");
}

Results:

'livelinkValue.toString()' is [?]

Returned LLValue printed:

A<1,?,RESERVED=0,EXTENDEDDATA=?,PERMISSIONS=-1593835521,ASSIGNEDTO=?,CONTAINER=true,CATALOG=0,CREATEDATE=D/2010/8/25:3:32:56,GROUPPERM=12582207,COMMENT=?,MODIFYDATE=D/2014/6/22:1:34:39,CATEGORY=?,STATUS=?,MINOR=?,GIF=?,DATEEFFECTIVE=?,USERPERM=23358191,ORIGINALVOLID=0,WORLDPERM=128,TYPE=?,VERSIONNUM=0,SUBTYPE=0,PRIORITY=?,MAJOR=?,USERID=2833321661,ID=57340237,DATECOMPLETED=?,CHILDCOUNT=23621,CACHEEXPIRATION=0,EXATT2=?,EXATT1=?,ORDERING=?,PARENTID=57882886,PERMID=?,NAME=Scheduled_Reports,CREATEDBY=281223661,SYSTEMPERM=167727215,DATEDUE=?,Milestone=?,DATEEXPIRATION=?,RESERVEDDATE=?,DATESTARTED=?,RESERVEDBY=0,TargetURL=?,DATEASSIGNED=?,ORIGINALID=0,RELEASEREF=?,VOLUMEID=-2000,GROUPID=283660,MAXVERSION=-1>

Thanks a lot!

Best Regards,

Edirim.
 
There is a object in livelink like documents,folder etc called a URL object.When you create such an object it will ask the user what hyperlink
you want the object to go to when clicked.Your node debug subtype=0 which is a folder so if you create such an object and run your code you will see what you stored there.

If you want to get the livelink cgi address which ends like

http:<servername>/<virtual directory>/<livelink script like llisapi.dll,livelink.exe> then lapi does not give you any methods.

if that is what you want let me know I will tell you a workaround.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
What I am looking for is to acquire the URL of an object (referenced in my code by 'objectId') at a particular folder ('volumeId') in Livelink.

LAPI does offer this facility as shown in my code above through the LAPI_DOCUMENTS.GetURLAddress(...) method.

My issue is that I have a valid session and yet with the method call above, I am getting a '?' as the resulting URL.

In other words, I need to find out what is wrong with my code posted.

Thanks a lot for your help, appnair!

Best Regards!
 
livelinkValue.toString("NAME") //name of what the object is called

LLVALUE is a data structure of all that column headings you have printed there



Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Great point; thanks! However, for extracting the URL following based on your recommendation, the call should be livelinkValue.toString("TargetURL");. Using "NAME" would return something else I am not looking for. By the way, the livelinkValue.toString("TargetURL"); statement now triggers an exception that says "get(name) not implemented for this datatype." Am I having the wrong lapi.jar? Thanks!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top