connInfo.setRealm("");
connInfo.setSearchBase("ou=searchbase");
connInfo.setSystemPassword(encodeBase64("systemPassword"));
connInfo.setSystemUsername(encodeBase64("systemUsername"));
LdapUserAndGroupAuthConfigurationDTO userGroupConf = new LdapUserAndGroupAuthConfigurationDTO();
dto.setUserAndGroupConfig(userGroupConf);
userGroupConf.setUserMemberOfAttribute("userMemberOfAttribute");
userGroupConf.setGroupBaseDn("groupBaseDn");
userGroupConf.setGroupIdAttribute("groupIdAttribute");
userGroupConf.setGroupMemberAttribute("groupMemberAttribute");
userGroupConf.setGroupMemberFormat("groupMemberFormat");
userGroupConf.setGroupObjectClass("groupObjectClass");
userGroupConf.setLdapGroupsAsRoles(true);
userGroupConf.setEmailAddressAttribute("emailAddressAttribute");
userGroupConf.setUserBaseDn("userBaseDn");
userGroupConf.setUserIdAttribute("userIdAttribute");
userGroupConf.setUserObjectClass("userObjectClass");
userGroupConf.setUserPasswordAttribute("userPasswordAttribute");
userGroupConf.setUserRealNameAttribute("userRealNameAttribute");
userGroupConf.setUserSubtree(true);
XStream xstream = getXMLXStream();
Response response = null;
try {
response = RequestFacade.sendMessage(RequestFacade.SERVICE_LOCAL + "ldap/servers", Method.POST,