1
How to call stub a Genexus 15 precedent in a Java application?
Stub no Genexus:
stub salvadados(in:&StringTeste, out:&StringRetorno)
&StringRetorno = "ola " + &StringTeste
endstub
After deploying the application by Genexus and generating the.jar file, I am importing it into my Java application using Netbeans, and it correctly recognizes the precedent, but I cannot access the generated method for my stub.
My Java class: (in the method EnviaDados
there is a call for the method gxep_salvadados
, which would be a reference to the stub I want to call, but this neither other method does exist within the imported class)
public class IntegracaoGenexus extends GXProcedure {
ptesteintegracao ptesteintegracao;
public void executeCmdLine(String args[]) {
execute();
}
public IntegracaoGenexus(int remoteHandle) {
super(remoteHandle, new ModelContext(IntegracaoGenexus.class), "");
}
public IntegracaoGenexus(int remoteHandle, ModelContext context) {
super(remoteHandle, context, "");
}
public void iniciar() {
ptesteintegracao = new ptesteintegracao(remoteHandle, context);
}
public void EnviaDados(String strDados) {
ptesteintegracao.gxep_salvadados(strDados);
}
public void MostraDados() {
//ptesteintegracao.gxep_mostradados();
}
public void execute() {
execute_int();
}
private void execute_int() {
initialize();
privateExecute();
}
private void privateExecute() {
new ptesteintegracao(remoteHandle, context).gxep_salvadados("teste");
cleanup();
}
public static Object refClasses() {
GXutil.refClasses(IntegracaoGenexus.class);
return new GXcfg();
}
protected void cleanup() {
CloseOpenCursors();
exitApplication();
}
protected void CloseOpenCursors() {
}
/* Aggregate/select formulas */
public void initialize() {
/* GeneXus formulas. */
Gx_err = (short)(0) ;
}
private short Gx_err ;
}