I've tested the call using the chrome Postman plugin and there I'm getting an response so restful is working on my JasperServer
This is the config.json that I'm using:
- Code: Select all
test_invoke:{
services: {
jasper_info:{
url:"http://localhost:8181/jasperserver-pro/rest_v2/serverInfo",
method:"get",
returns:{
data:"String"
}
}
}
And I'm calling it like this:
- Code: Select all
function onAction(event) {
plugins.Velocity.invokeService('jasper_info',{}, callBack);
}
function callBack(result){
application.output('callback');
if (result) {
if (result.exception) {
application.output(result.exception, LOGGINGLEVEL.ERROR);
} else {
application.output(JSON.stringify(result));
}
}
}
But I'm getting an empty object back from the call. maybe my config.json is incorrect, but according to the documentation it should return a string and does not require athentication.