directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio <cla...@gmail.com>
Subject Search problems
Date Sat, 21 Mar 2015 14:29:38 GMT
Hello friends,

I want to list all the mails that have an entry in my ldap server.

My code is:



LdapConnection connection =new LdapNetworkConnection(hostname));
  connection().bind(adminLDAP, password);

                ArrayList<String> mailList = new ArrayList<String>();

EntryCursor cursor = connection().search( dnUser, "(mail=*)",
SearchScope.SUBTREE );
Entry resultSearch= null;
 while ( cursor.next() )
{

 resultSearch = cursor.get();
   Attribute attr = resultSearch.get("mail");
   mailList.add(attr.getString());


 }



This code lists only one mail for each of the entry not everyone who has.

I need help with this


thank you very much

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message