urgent help needed in ldap search operation
Code Snippet
// Connection to the server
ld.connect(ldapHost,ldapPort)
String base = "o=product, ou=Members, o=ABC, o=abc.net";
String filter = "(objectClass=*)";
String[] ATTRS = {"cn"};
// Search String
res = ld.search(base,LDAPv2.SCOPE_SUB,filter,ATTRS,false );
// Printing Results
while (res.hasMoreElements()) {
try {
// The next entry
LDAPEntry entry = res.next();
printEntry(entry, ATTRS);
}
.....
}
Root Structure is as follows
abc.net
ABC
Members
product
cn =ddd
cn =aaa
cn =bbb
sales
c=US
cn =ddd
cn =aaa
cn =bbb
marketing
Under Members there are 3 different roots.again in sales there is another subroot called c=US which contains list of cn values.
When I give the search string as "o=product, ou=Members, o=ABC, o=abc.net",I could get all the cn values.
But when I give the Search string as "c=US,o=product, ou=Members, o=ABC, o=abc.net",no values are returned.
Can you help me in tracing this pbm
Thanks,
Vidhya
|