Hi Elena,
I've added your web service to a project as WebSrvice1 and tried executing the following routine:
[DelphiScript]
function test();
var res, message;
begin
WebServices.WebService1.getCalculateValues(1, 1, res, message);
Log.Message(res);
Log.Message(message);
end;
According to the execution log, the "res" variable's value was set to 2, and the "message" variable's value was not set at all. I suppose that this is the expected behavior of the function - the function successfully calculated the value and did not return any error messages (note that the last parameter's name is "errormessage").