Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Method not available from Java
Pamela_Weller
Our LL consultant has provided me the Java class below but when I try to compile it I am receiving the error "The method initCall(String) from the type LLConnnect is not visible". I know almost nothing about LL but know a fair amount about Java. Can anyone point me in the right direction?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~import com.opentext.api.LLConnect;import com.opentext.api.LLValue;public class LAPI_ECOMM{ public LAPI_ECOMM( LLConnect connect ) { fConnect = connect; } protected LLConnect fConnect; public int HelloWorld(LLValue message) { fConnect.initCall( "HelloWorld" ); fConnect.marshall(); fConnect.execute( fConnect ); message.setValue( fConnect.unMarshall( "message" ) ); fConnect.unMarshall(); return fConnect.getStatus(); }}
Find more posts tagged with
Comments
Carsten_Kulms
Message from Carsten Kulms via eLinkThe compile fails because the class LAPI_ECOMM resides in an unnamedpackage()(or the "default package"; btw: in general not the best idea)wheras LLConnect belongs to the package "com.opentext.api". Since the method LLConnect.initCall is default accessible(; sometimes also called "package private") it is "not visible" by the class LAPI_ECOMM (which, as mentionedabove, is part of a different package).I guess that class was provided as an example how to implement LAPIstubs for own LAPI extensions. Well, then the current design of the LAPIclasses forces you to place such a class also in the packagecom.opentext.api (or to access it in a somewhat `dirty` way by means ofreflection suppressing access checks -- not recommended).
Pamela_Weller
Thanks a lot Carsten. Makes sense.