Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
How to retrieve cookie in LAPI
Kevin_Jones_(exeinc01admin_-_(deleted))
Could you give me a sample code in Java (not applet) about how to retrieve the cookie in order to open connetion by using session = new LLSession(servername, port, cookie); Thanks!Sharon
Find more posts tagged with
Comments
Mahmoud_Dayeh_(ecead_mad_-_(deleted))
I'm not sure if this will help but recently I had a scenario where I had to call ASP.NET application from Livelink without asking user to authenticate again.That means I had to pass users livelink cookie to my .aspx page. (Opentext suggestion: Use java applet to get users login cookie) Well I dunno how to work with java so I used Oscript to solve my problem.Here's how I managed to solve my problem 1. Create a new Livelink Module.2. Create a new Request Handler titled GetLLCookie.(Check the attachments for Execute code)3. create a redirectmeta.html file in your module's html folder.(Check the attachments for html code)4. Install your module in Livelink5. Now from Livelink call your application with following URL..../livelink.exe?func=.getLLCookie&nextUrl= For e.g.
http://takhq/hqll1/livelink.exe?func=ece.getLLCookie&nextUrl=http://takhqllsrv3/oom/TaskPage.aspx6
. Now from my aspx page I check for the parameter cookieval which contains cookie information. Now I pass this cookie to my LAPI component.How it works----------------1. When user clicks on a link, it calls a GetLLCookie request handler. GetLLCookie function retrieves the Livelink cookie and appends it to the NextURL parameter.2. redirectmeta.html file redirects to the URL specified in nextURL parameter.I hope this helps.If you need any information or you have found any other solution for your problem, please mail me on vishal@ecead.aeCheers,Vishal
Mahmoud_Dayeh_(ecead_mad_-_(deleted))
I'm not sure what exactly you require. In my previous post, I've described how to pass cookie information to your web application. However if you require to find the cookie information from Lapi then you have to use GetLLCookieInfo function.I've attached the sample code in C# which is very similar to java.Hope it helps.
Developers_Comparex_Africa_(x-comparexdevelopment_
Another method that could also work to get the currently logged in user is to use a Livelink XML Skin to extract the current user id. Log in to Livelink using LLSession as Administrator and then use the LL Session's impersonate function to impersonate the user...