public TextArray ddrGetsEntry(string file, string iens, string flds, string flags) { TextArray result = new TextArray(); string msg = MdwsUtils.isAuthorizedConnection(mySession); if (msg != "OK") { result.fault = new FaultTO(msg); } if (result.fault != null) { return result; } try { ToolsApi api = new ToolsApi(); string[] response = api.ddrGetsEntry(mySession.ConnectionSet.BaseConnection, file, iens, flds, flags); return new TextArray(response); } catch (Exception exc) { result.fault = new FaultTO(exc); return result; } }
public TaggedTextArray sitesHavePatch(string sitelist, string patchId) { TaggedTextArray result = new TaggedTextArray(); //if (mySession.ConnectionSet.Count == 0 || !mySession.ConnectionSet.IsAuthorized) //{ // result.fault = new FaultTO(NO_CONNECTIONS); //} if (String.IsNullOrEmpty(sitelist)) { result.fault = new FaultTO("Missing sitelist"); } else if (String.IsNullOrEmpty(patchId)) { result.fault = new FaultTO("Missing patchId"); } if (result.fault != null) { return result; } try { AccountLib acctLib = new AccountLib(mySession); TaggedTextArray sites = acctLib.visitSites(mySession.MdwsConfiguration.AllConfigs[ConfigFileConstants.PRIMARY_CONFIG_SECTION][MdwsConfigConstants.SERVICE_ACCOUNT_PASSWORD], sitelist, MdwsConstants.CPRS_CONTEXT); ToolsApi api = new ToolsApi(); IndexedHashtable t = api.hasPatch(mySession.ConnectionSet, patchId); result = new TaggedTextArray(t); } catch (Exception e) { result.fault = new FaultTO(e.Message); } finally { mySession.ConnectionSet.disconnectAll(); } return result; }
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; }
public TaggedTextArray runRpc(string rpcName, string[] paramValues, int[] paramTypes, bool[] paramEncrypted) { TaggedTextArray result = new TaggedTextArray(); try { ToolsApi api = new ToolsApi(); IndexedHashtable s = api.runRpc(mySession.ConnectionSet, rpcName, paramValues, paramTypes, paramEncrypted); return new TaggedTextArray(s); } catch (Exception exc) { result.fault = new FaultTO(exc); return result; } }
public TextTO isRpcAvailable(string sitecode, string target, string context) { TextTO result = new TextTO(); string msg = MdwsUtils.isAuthorizedConnection(mySession, sitecode); if (msg != "OK") { result.fault = new FaultTO(msg); } else if (target == "") { result.fault = new FaultTO("Missing target"); } else if (context == "") { result.fault = new FaultTO("Missing context"); } 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.isRpcAvailable(cxn, target, context); result = new TextTO(s); } catch (Exception e) { result.fault = new FaultTO(e.Message); } return result; }