public SiteArray getSiteDivisions(string sitecode) { SiteArray result = new SiteArray(); if (sitecode == "") { result.fault = new FaultTO("Missing sitecode"); } if (result.fault != null) { return(result); } try { EncounterApi api = new EncounterApi(); Site[] sites = api.getSiteDivisions(mySession.ConnectionSet.getConnection(sitecode), sitecode); result = new SiteArray(sites); } catch (Exception e) { result.fault = new FaultTO(e); } return(result); }