LS2J passing lotus object as pa

336 Views Asked by At

I am trying to use LS2J to pass the Notes Database Object as a parameter to a java object constructor method. However, I get the error message 'Java constructor failed to execute'. If I try to create a session within the java code( since I cannot pass either the session object or the database object as parameter from Lotus into Java method), it gives me 'Cannot create a session from an agent' error. Is there a workaround to pass either the session or Database object from Lotus Script into Java method?

Any help is greatly appreciated.

Thanks, Ro

1

There are 1 best solutions below

0
On
        Dim js As JAVASESSION
        Dim getHTMLClass As JAVACLASS
        Dim getHTMLObject As JavaObject
        Set js = New JAVASESSION
        Set getHTMLClass = js.GetClass("GetHTML")
        Set getHTMLObject = getHTMLClass.CreateObject
        s$ = getHTMLObject.getHTML(Doc.UniversalID)

With the above code, you can pass Document ID to the "GetHTML" class defined in java code.

Thanks.