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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is LAPI 9.7.1 supported with .NET Framework 2.0? 1

Status
Not open for further replies.

leirehernandez

Programmer
Jan 29, 2010
25
ES
Hello everyone,

We are working with Livelink 9.7.1 for CEDEFOP. We are integrating a .NET(.aspx pages) application in Livelink and We need to use the LAPI. I am using Microsoft Visual Studio 2005 (Microsoft.NET framework 2.0) to build my project(Web Site).

Can we use the LAPI 9.7.1 with .NET Framework 2.0? Are they supported versions?

I am adding to LAPI_NETp.dll reference in my project but when I compile the project this error appears:
“The specified module could not be found. (Exception from HRESULT: 0x8007007E)”
I have included LAPI_BASE.dll and LLKERNEL.dll in the PATH environment variable too.

Thank you in advance,

Best regards,
 
The right libraries to use in a lapi with C# or VB.NET is vjslib,lapi_netp and lapi_sspip (if you need to do SSO stuff)

The windows PATH variable should have

C:\Program Files\Open Text\LAPI\; or wherever you installed LAPI clinet files.

lapi_base.dll is never added as a refrence when you do lapi.

Suggest you look at environment preparation when you program with lapi in a .net environment

Also see if the livelink server in qn supports webservices.LAPI is going out of favor with OT but the only server that allows you to call enterprise webservices is
LES 9.7.1

You can use new lapi client libraries against old livelink installs to a good extent.


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
 
Hello appnair,

I have LES 9.7.1 so the problem could be other.
I've added the two references that you write and the enviroment preparation is OK as you write me.

Anyway, thank you very much for your help.

If you think of something new that could be happen, don't hesitate to tell me.

Thank you very much,

Leire
 
It is again unclear from your posting if your problem is solved are you able to connect successfully from your computer(aspx) to livelink or not ?Are you still having connectivity problems?

I just ran a test program in my computer with .NET and C# and it worked flawlessly for me.


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
 
Hello appnair
My problem is not solved because I still have te same problem. I have everything like you tell me but when I include the reference LAPI_NETp.dll in my project and I compile this error appears:
"The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

Thank you very much for your time,

Leire
 
Are you willing to do a small console program to test this and see if it has anything with the compiler problem.
I have attached the code here.Change the pertinent info.
I ran this code just before posting this on .net2 and lapi 9.7.1
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.opentext.api;




namespace StressTest
{
    class CreateDocument
    {
        //class member functions
        [STAThread]
        static void Main(string[] args)
        {
            try
            {
                
                
                
                //

                if (args.Length == 0 )
                {
                    Console.WriteLine("Expecting unique argument such as 'One','two','three'");
                    Console.ReadLine();
                    return;
                }
                
                //Create a new Livelink Session
                //PUT YOUR LLSERVER DETAILS HERE
                LLSession session = null;
                session = new LLSession("servername", 2099, "", "Admin", "adminpassword", null);

                //Initialize any LAPI Objects
                LAPI_DOCUMENTS doc = new LAPI_DOCUMENTS(session);

                //////////////////////////////////////////////////////////////////////
                //Code to Create a Document
                //////////////////////////////////////////////////////////////////////

                //Define the parent object's dataID and volumeID (also called ownerID)
               

                LLValue entInfo = (new LLValue()).setAssocNotSet();


                if (doc.AccessEnterpriseWS(entInfo) != 0)
                {
                    GetErrors(session);
                    return;
                }

                //create the output variable objectInfo, which will contain the object's information
                LLValue objectInfo = (new LLValue()).setAssocNotSet();

                //Setup any information for creation
                LLValue createInfo = (new LLValue()).setAssocNotSet();
                LLValue request = (new LLValue()).setAssocNotSet();
                request.add("Comment", "These are the document's comments.");
                createInfo.add("request", request);
               
                //Create the document object in Livelink
                if (doc.CreateObjectEx(0, entInfo.toInteger("ID"), LAPI_DOCUMENTS.OBJECTTYPE, LAPI_DOCUMENTS.FOLDERSUBTYPE, "Stress Test Folder-"+args[0], createInfo, objectInfo) != 0)
                {
                    GetErrors(session);
                    return;
                }
                else
                    Console.WriteLine("Folder Created.");
                //rteain folderid for subsequent operation
                int folderid = objectInfo.toInteger("ID");

                for (int i = 0; i < 100; i++)
                {

                //Create the document object in Livelink
                    if (doc.CreateObjectEx(0, folderid, LAPI_DOCUMENTS.OBJECTTYPE, LAPI_DOCUMENTS.DOCUMENTSUBTYPE, "SAMPLE PDF_" + i.ToString(), createInfo, objectInfo) != 0)
                {
                    GetErrors(session);
                    return;
                }
                else
                    Console.WriteLine("Document Object Created.");

                //create the output variable versionInfo, which will contain the version's information
                LLValue versionInfo = (new LLValue()).setAssocNotSet();

                //Add a version to the document object
                if (doc.CreateVersion(0, objectInfo.toInteger("ID"), "c:\\temp\\sample.pdf", versionInfo) != 0)
                {
                    GetErrors(session);
                    return;
                }
                else
                    Console.WriteLine("Version Created.");

                //////////////////////////////////////////////////////////////////////

            }

            }
            catch (Exception e)
            {
                Console.WriteLine("Application encountered an exception:");
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
                Console.ReadLine();
            }
        }

        //This function outputs any errors from the session
        static void GetErrors(LLSession session)
        {
            // Get the error information
            int stat = session.getStatus();
            string message = session.getStatusMessage();
            string errMsg = session.getErrMsg();
            string apiError = session.getApiError();

            Console.WriteLine("Session failure status is " + stat +
                " (0x" + Convert.ToString(stat) + ")");

            if (message != "" || errMsg != "" || apiError != "")
            {
                Console.WriteLine("Message=" + message);
                Console.WriteLine("errMsg=" + errMsg);
                Console.WriteLine("apiError=" + apiError);
            }

            Console.ReadLine();
        }
    }
}




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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top