Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
LAPI calls against localhost with Directory Services
Kyle_Baley
Livelink 9.5 SP2I've got Directory Services installed on my local machine and am trying to make LAPI calls with C# (.NET 2.0) against it using NTLM.Here's the sample code: LLValue config = new LLValue( ).setAssocNotSet( ); config.add( "LivelinkCGI", "/Livelink/livelink.exe" ); config.add( "HTTPS", LLValue.LL_FALSE ); config.add( "HTTPUserName", "" ); config.add( "HTTPPassword", "" ); LLSession session = new LLSession( "localhost", 80, null, "", "", config ); LAPI_DOCUMENTS docs = new LAPI_DOCUMENTS( session ); LLValue entInfo = Session.getBlankAssoc( ); docs.AccessEnterpriseWS( entInfo ); MessageBox.Show( entInfo.toString( "Name" ) );This fails on the second last line with the error: An unhandled exception of type 'java.lang.StringIndexOutOfBoundsException' occurred in vjslib.dll. Additional info: 293It works fine if I create the session using port 2099 and supplying a username and password. It also works if I use our sandbox environment instead of localhost. And as far as I know, my localhost is configured the same way as the sandbox.Also fails if I use my machine name or 127.0.0.1 instead of localhost. I've tried changing my cgi value to something wacky to see if I get a different error and I do: invalid CGI.I've also tried stepping through the code in Builder. I'm able to do that using port 2099 but with the cgi version, it never makes to my breakpoint.Any help will be greeted with enthusiasm and quite possibly, my undying gratitude.Thanks,Kyle
Find more posts tagged with
Comments
eLink User
Message from Nair, Krishnankutty via eLinkHve you checked func=admin.testargs to see if your webserver isrecognizing and passing the REMOTE_USERTo the livelink CGI?For Dire SVCs to work the webserver for livelink virtual directoryshould either have anonymous or IWA and Basic Authentication is a must.Also I have posted a smaple in the WIKI and I think in that the Userand password(dummy) is passed.Attaching that to see if this helps -----Original Message-----From: eLink Discussion: LAPI Discussion[mailto:lapi@elinkkc.opentext.com] Sent: Thursday, March 01, 2007 8:37 PMTo: eLink RecipientSubject: LAPI calls against localhost with Directory ServicesLAPI calls against localhost with Directory Services Posted by Rome,Libby on 03/01/2007 09:34 PMLivelink 9.5 SP2I've got Directory Services installed on my local machine and am tryingto make LAPI calls with C# (.NET 2.0) against it using NTLM.Here's the sample code: LLValue config = new LLValue( ).setAssocNotSet( ); config.add( "LivelinkCGI", "/Livelink/livelink.exe" ); config.add( "HTTPS", LLValue.LL_FALSE ); config.add( "HTTPUserName", "" ); config.add( "HTTPPassword", "" ); LLSession session = new LLSession( "localhost", 80, null,"", "", config ); LAPI_DOCUMENTS docs = new LAPI_DOCUMENTS( session ); LLValue entInfo = Session.getBlankAssoc( ); docs.AccessEnterpriseWS( entInfo ); MessageBox.Show( entInfo.toString( "Name" ) );This fails on the second last line with the error: An unhandledexception of type 'java.lang.StringIndexOutOfBoundsException' occurredin vjslib.dll. Additional info: 293It works fine if I create the session using port 2099 and supplying ausername and password. It also works if I use our sandbox environmentinstead of localhost. And as far as I know, my localhost is configuredthe same way as the sandbox.Also fails if I use my machine name or 127.0.0.1 instead of localhost.I've tried changing my cgi value to something wacky to see if I get adifferent error and I do: invalid CGI.I've also tried stepping through the code in Builder. I'm able to dothat using port 2099 but with the cgi version, it never makes to mybreakpoint.Any help will be greeted with enthusiasm and quite possibly, my undyinggratitude.Thanks,Kyle[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: LAPI Discussion
https://knowledge.opentext.com/knowledge/llisapi.dll/open/765428Livelink
Server:
https://knowledge.opentext.com/knowledge/llisapi.dllTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.lapi@elinkkc.opentext.com.-----------------------------------------*Please note my E-Mail Address has changed. Please update yourcontact list*Anadarko Confidentiality Notice: This electronic transmission and any attached documents or otherwritings are intended only for the person or entity to which it isaddressed and may contain information that is privileged,confidential or otherwise protected from disclosure. If you havereceived this communication in error, please immediately notifysender by return e-mail and destroy the communication. Anydisclosure, copying, distribution or the taking of any actionconcerning the contents of this communication or any attachments byanyone other than the named recipient is strictly prohibited.
eLink User
Message from Carsten Kulms via eLink>From you description the connect to the HTTP server seems to work butthe request never reaches the LES. Since it works in your "sandbox" Ithink there must be something weird in the local environment.Is there any more information available about the exception (somethinglike a stacktrace)?Can you try again using a tool which logs the data which goes throughthe `wire` (e.g.
https://tcpmon.dev.java.net/
(Java))?
Kyle_Baley
Thanks for the reply, Krishnankutty. I should have said that I'm testing this with a Windows Forms app so I'm quite positive the proper credentials are being passed to Livelink. I did try it again with Basic Auth turned on in the Livelink server but no go.
Kyle_Baley
I won't pretend to know much about TCP monitoring tools but I've attached the log from a TDIMon session from a recent attempt to access my localhost again.Thanks for taking a lookKyle
eLink User
Message from Carsten Kulms via eLinkUnfortunately TDIMon isn't helpfull, because it just logs information_about_ connections. The idea was to examine the _content_ of thecommunication between your app and the HTTP server.Please give TCPMon a try. It is very easy to use.
Kyle_Baley
What can I say? I'm just a programmer.The attached file contains the requests from two runs of an application that creates an LLSession and a LAPI_DOCUMENTS object, then calls AccessEnterpriseWS on the docs objects. The first run is against my localhost (which is failing) and the second run is against our sandbox server (which is not). Each run ended up with two requests to the server.Hope you can make something of it 'cause I can't. The two runs are different but I don't see anything in there to indicate what might be wrong. Thanks a ton for your help so far.Kyle
eLink User
Message from Carsten Kulms via eLinkThere seems to be a difference in the NTLM authorization process.Since the responses from the HTTP server are missing I cannot see whatgoes wrong. Or if, e.g., the server returns an error.Afaik, the requests you labeled #2 are the first ones. Usually theprocess would be(1) LAPI client sends a request(2) HTTP server replies "authorization (NTLM) required"(3) LAPI client sends new request, starting NTLM negotiation(4) HTTP server replies with NTLM negotiation specific message(5) LAPI client sends request again, now with a proper (NTLM)authorization(6) HTTP server process the request (here: runs the Livelink CGI) anddelivers the resultDoes NTLM autorization work if you access your local HTTP server withthe IE?