public TaggedText getTeams(string sitecode) { TaggedText result = new TaggedText(); 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); EncounterApi api = new EncounterApi(); DictionaryHashList teams = api.getTeams(cxn); result = new TaggedText(sitecode, teams); } catch (Exception e) { result.fault = new FaultTO(e.Message); } return(result); }