02-09-2017 04:44 AM
Hello,
I need to call a web service from Geomedia Smart Client via custom script:
IG.sync = function() {
IG.busy({showIsLoading: true,message: 'Sto sincronizzando i dati con ascot, attendere...',title: 'ATTENDERE'});
var urlServizio = "myUrl";
var site = IG.getItemById('SITE').getValue();
var session = IG.getItemById('SESSIONID').getValue();
var user = IG.getItemById('USERID').getValue();
var project = IG.getItemById('PROJECTID').getValue();
var istat = IG.getItemById('ISTAT').getValue();
var options = {
url: urlServizio,
type: 'POST',
data: {'site': site, 'session': session, 'user': user, 'project': project, 'istat': istat, 'risp': "JSON"},
success: function (data) {
IG.notify(JSON.stringify(data)).show();
if (data.esito==="POSITIVO") {
IG.notify('Esito Positivo').show();
}
else {
IG.notify('Esito Negativo').show();
}
IG.busy.close();
},
error: function (data){
//alert(data.Exception);
IG.notify('Error').show();
IG.busy.close();
}
};
$.ajax(options);
}
I always get error from smart client browse, while I get success throwing the workflow node on Chrome browser. So, what's the problem on client? Should I do the same call in a different way?
Regards,
Marco
Solved! Go to Solution.
02-23-2017 01:27 AM
the problem was JRE version (1.8.0_101)
I ugraded to 1.8.0_121
Now it works!