public TextTO getVariableValue(string sitecode, string arg)
{
TextTO result = new TextTO();
string msg = MdwsUtils.isAuthorizedConnection(mySession, sitecode);
if (msg != "OK")
{
result.fault = new FaultTO(msg);
}
if (result.fault != null)
{
return result;
}
if (sitecode == null)
{
sitecode = mySession.ConnectionSet.BaseSiteId;
}
try
{
AbstractConnection cxn = mySession.ConnectionSet.getConnection(sitecode);
ToolsApi api = new ToolsApi();
string s = api.getVariableValue(cxn, arg);
result = new TextTO(s);
}
catch (Exception e)
{
result.fault = new FaultTO(e.Message);
}
return result;
}