How to call a Genexus 15 procedure stub in a Java application?
Stub in Genexus:
stub salvadados(in:&StringTeste, out:&StringRetorno)
&StringRetorno = "ola " + &StringTeste
endstub
After performing the application deploy by Genexus and generating the .jar file, I'm importing it into my Java application using NetBeans, and it correctly recognizes the procedure, however I can not access the generated method for my stub.
My Java class: (in the EnviaDados
method there is a call to the gxep_salvadados
method, which would be a reference to the stub I want to call, but this method does not exist inside the imported class) p>
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 ;
}