koevet
Dec 6th, 2006, 08:42 AM
Hello,
I have the following code:
DistinguishedName name = new DistinguishedName("DC=extranet,DC=cap");
name.add("ou", "test");
List l = ldapTemplate.search(name.encode(), "objectClass=*", SearchControls.SUBTREE_SCOPE, new AttributesMapper() {
public Object mapFromAttributes(Attributes attrs) throws NamingException {
return attrs.get("cn").get();
}
}
);
System.out.println("!!!!!!!!!!!!!!!!!!>" + l.size());
...
The List size is alway 0. I have tried different approaches but with no luck.
The LDAP server (MS AD) returns the correct reply if I use any kind of ldap browser.
Any idea?
Thanks
Luciano
I have the following code:
DistinguishedName name = new DistinguishedName("DC=extranet,DC=cap");
name.add("ou", "test");
List l = ldapTemplate.search(name.encode(), "objectClass=*", SearchControls.SUBTREE_SCOPE, new AttributesMapper() {
public Object mapFromAttributes(Attributes attrs) throws NamingException {
return attrs.get("cn").get();
}
}
);
System.out.println("!!!!!!!!!!!!!!!!!!>" + l.size());
...
The List size is alway 0. I have tried different approaches but with no luck.
The LDAP server (MS AD) returns the correct reply if I use any kind of ldap browser.
Any idea?
Thanks
Luciano