public PermissionGroups GetAllLDAPSecurityGroups() { try { OutgoingWebResponseContext context = WebOperationContext.Current.OutgoingResponse; context.ContentType = "application/xml"; return(_adapterProvider.GetAllSecurityGroups()); } catch (Exception ex) { CustomErrorLog objCustomErrorLog = new CustomErrorLog(); _CustomError = objCustomErrorLog.customErrorLogger(ErrorMessages.errSecurityGroups, ex, _logger); objCustomErrorLog.throwJsonResponse(_CustomError); return(null); } }