I try to use Headless Client but without success.
I have a solution "Sola"
I have a form "FormA" which contains a method "methA" and a callback method
.
I have tried different syntax:
- Code: Select all
function onActionLaunchClient()
{
client = plugins.headlessclient.createClient('Sola','login','pwd',null);
// I tried this
client.queueMethod(null,"forms.FormA.methA",["something"],callback);
// I tried this
client.queueMethod(null,"FormA.methA",["something"],callback);
// I tried a global method
client.queueMethod(null,"globalMethod",["something"],callback);
}
function methA(param)
{
// do something
}
function callback(event) {
// do some stuff
if (JSClient.CALLBACK_EVENT == event.getType())
{
// handle normal execute of remote method
application.output("work");
}
else if (JSClientC.ALLBACK_EXCEPTION_EVENT == event.getType())
{
// handle exception execute of remote method
application.output("notwork");
}
client.shutdown()
}
In all the case I get CALLBACK_EXCEPTION_EVENT in my callback method
If someone can explain me what am I doing wrong.
Thank you in advance for your support