directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Empty/Null Attribute
Date Tue, 11 Sep 2012 13:23:34 GMT
Le 9/11/12 2:54 PM, Merve Temizer a écrit :
> Hello,
>
> I have some objectClasses and dc and ou attributes and their values, in an
> entry in LDAP.
> I try to read ou attribute but i cant get it with below code.
> I can get dc value correctly.
> I know i must control if it is null, but why might "ou" be null despite of
> taking place in LDAP.
>
> NamingEnumeration answer = ctx.search(searchBaseDn, filter, ctls);
>         try
>       {
>           while (answer.hasMore())
>           {
>       SearchResult sr = (SearchResult) answer.next();
>       OrganizationPojo organizationPojo = new OrganizationPojo();
>       organizationPojo.setOrgDc((String)sr.getAttributes().get("dc").get());
>       organizationPojo.setOrgOu((String)sr.getAttributes().get("ou").get());
>
http://docs.oracle.com/javase/jndi/tutorial/

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Mime
View raw message