The parameters that you pass into the Java object – are theymarshalled through to your Java class as LLValues? Has anyone experimentedwith this yet?
Ta
JC
JonnyCoombes Bsc (Hons)Principal Solutions ArchitectOpen Text CorporationMobile: +44 (0) 7748 986 937
Phone:+44 (0) 1494 679700
YIM: ot_jcoombes
The market leader in providing Enterprise Content Management solutions. www.opentext.com This e-mail is protected by domestic and international copyright laws andtreaties and is the property of Open Text Corporation, it may containconfidential and/or trade secret information of the Open Text Corporationand/or its subsidiaries (OTC), and may be subject to legal privilege in favorof OTC. This e-mail may only be lawfully received, accessed, displayed on acomputer screen, printed, copied, and/or used by the specific addressee(s)named above (“Authorized Recipient”) for the purpose for which it was sent byOTC. All other rights and licenses to this e-mail are fully reserved to OTC. Ifyou are not an Authorized Recipient, you are required to immediately deletethis e-mail in its entirety without printing, copying, using, and/orre-transmitting this e-mail, either in whole or in part. The transmission ofthis e-mail by OTC is not to be construed as a waiver by OTC and/or theindividual sending this e-mail on behalf of OTC of any of their respectiverights or privileges at law or otherwise, howsoever arising.
From: eLinkDiscussion: Development Discussion [mailto:development@elinkkc.opentext.com] Sent: 31 August 2006 07:43To: eLink RecipientSubject: RE Re Calling Java from OScript
RE Re Calling Java from OScript
Posted by hstoop (Stoop, Hans) on 08/31/2006 02:42 AM
In reply to: Re Calling Java from OScript
Posted by eu0018377 (Poser, Rolf H) on 08/31/2006 01:46 AM
Message from Hans Stoop <hstoop@opentext.com> via eLink I also find it exciting. I was thinking of using JDBC to connect to other repositories. Hans > -----Original Message----- > From: eLink Discussion: Development Discussion > [mailto:development@elinkkc.opentext.com] > Sent: donderdag 31 augustus 2006 7:47 > To: eLink Recipient > Subject: Re Calling Java from OScript > > Re Calling Java from OScript > Posted by Poser, Rolf H on 08/31/2006 01:46 AM > > Message from Rolf Poser <rolf@stasolutions.co.za> via eLink > > Hans: > > I agree - this is interesting, in fact it is exciting ! > > I think it's 9.6's best-kept secret, but one that will > ultimately have a very positive effect on the development > effort. Here are just a few ideas of what becomes instantly > more possible: > > - Using an open source library (LGPL or less restrictive) to > enhance eLink to access all types of mailboxes, not only > POP3. This should actually mean less oscript to maintain. > - Using an open source library to do web service calls. XML > in oscript is very manual, and SOAP would be doubly so, so > using something "off-the-shelf" would make life a lot simpler > for that kind of scenario. > > > > Regards, > Rolf. > > > Calling Java from OScript > > Posted by Stoop, Hans on 08/30/2006 04:20 PM > > > > Message from Hans Stoop <hstoop@opentext.com> via eLink > > > > > > I think you would be interested to know that starting from Livelink > > 9.6 is is possible to call Java methods from OScript. From the > > documentation: > > > > The built-in functions in the JavaObject package provide > the ability > > to access Java classes and services from OScript. The major > > functionalities offered in the JavaObject package are the following: > > > > Class Methods Index > > > > o New( String className, List parameters ) > > Creates a new instance of a Java class. > > > > o InvokeStaticMethod( String className, String methodName, List > > parameters ) > > Invokes a static method defined for a Java class. > > > > o GetStaticField( String className, String fieldName ) > > Returns the value of a static field. > > > > o SetStaticField( String className, String fieldName, > Dynmaic value ) > > Sets the value of a static field. > > > > o GetError() > > Returns the JNI exception error message from the last operation. > > > > o GetErrorStack() > > Returns a List for the stack trace associated with an > exception in > > the last JNI operation. > > > > Instance Methods Index > > > > o InvokeMethod( String methodName, List parameters ) > > Invokes an instance method defined for a Java class. > > > > o GetField( String fieldName ) > > Returns the value of an instance field. > > > > o SetField( String fieldName, Dynamic value ) > > Sets the value of an instance field. > > > > Hans > > > > [To reply to this thread, use your normal E-mail reply function.] > > > > ============================================================ > > > > Discussion: Development Discussion > > https://knowledge.opentext.com/knowledge/llisapi.dll/open/786303 > > > > Livelink Server: > > https://knowledge.opentext.com/knowledge/llisapi.dll > > > > To Unsubscribe from this Discussion, send an e-mail to > > unsubscribe.development@elinkkc.opentext.com. > > > > > > > > [To reply to this thread, use your normal E-mail reply function.] > > ============================================================ > > Topic: Calling Java from OScript > https://knowledge.opentext.com/knowledge/llisapi.dll/open/7702825 > > Discussion: Development Discussion > https://knowledge.opentext.com/knowledge/llisapi.dll/open/786303 > > Livelink Server: > https://knowledge.opentext.com/knowledge/llisapi.dll > > To Unsubscribe from this Discussion, send an e-mail to > unsubscribe.development@elinkkc.opentext.com. > > >
[To reply to this thread, use your normal E-mail reply function.]
Topic:
Calling Java from OScript
Discussion:
Development Discussion
Livelink Server:
Knowledge Center
To Unsubscribe from this Discussion, send an e-mail to unsubscribe.development@elinkkc.opentext.com.
I guess you could use LLValue.valueToString in order to serialise amore complex parameter to a string, pass this through to the Java class, andthen de-serialise it using the built in LLValue cracking code which is presentin lapi.jar. Going back the other way, just use the same process in reverse.
I can’t see why this shouldn’t work…
Cheers
The market leader in providing Enterprise Content Management solutions. www.opentext.com This e-mail is protected by domestic and international copyright laws andtreaties and is the property of Open Text Corporation, it may containconfidential and/or trade secret information of the Open Text Corporationand/or its subsidiaries (OTC), and may be subject to legal privilege in favorof OTC. This e-mail may only be lawfully received, accessed, displayed on acomputer screen, printed, copied, and/or used by the specific addressee(s)named above (“Authorized Recipient”) for the purpose for which it was sent byOTC. All other rights and licenses to this e-mail are fully reserved to OTC. Ifyou are not an Authorized Recipient, you are required to immediately delete thise-mail in its entirety without printing, copying, using, and/or re-transmittingthis e-mail, either in whole or in part. The transmission of this e-mail by OTCis not to be construed as a waiver by OTC and/or the individual sending thise-mail on behalf of OTC of any of their respective rights or privileges at lawor otherwise, howsoever arising.
From: eLinkDiscussion: Development Discussion [mailto:development@elinkkc.opentext.com] Sent: 21 September 2006 01:50To: eLink RecipientSubject: Experimenting with Java in LL 96
Experimenting with Java in LL 96
Posted by hferguso (Ferguson, Hugh) on 09/20/2006 08:45 PM
In reply to: Calling Java from OScript
Posted by hstoop (Stoop, Hans) on 08/30/2006 04:20 PM
After reading this thread I did some experimenting myself. I've verified that Livelink finds my classes if I put the .class files in their appropriate file hierarchy under javaserver/lib. Really we ought to be able to drop a jar file there. Perhaps there's an undocumented place that we can write our new jar file name to so that it gets in LL's JVM classpath. On the topic of primitives vs objects, I've successfully fetched a string from my class. Attempts to retrieve a java date field have failed. Really though for this to be truly useful, we need to be able to map a few more types other than String and int. When I invoke a method that returns java.util.Date, my return object is of type JavaObject. I'm curious if there is a way to cast it to the appropriate Oscript type, a kind of LLValue for oscript. -hugh