public static Agents GetAgents() { //Get agents list Agents agents = null; try { _Client = new ShipScheduleServiceClient(); agents = _Client.GetAgents(); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetAgents() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetAgents() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetAgents() communication error.", ce); } return(agents); }