directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: ldap attributes names
Date Fri, 30 Jan 2009 14:45:52 GMT
Hi,

On Fri, Jan 30, 2009 at 1:37 PM, Mikołaj Habdank <m@szb.pl> wrote:
> hi
>
> i am using groovy-ldap , but in our LDAP (apacheds) there is a lot of
> problems with calmelCase names.

Which version of ADS are you using ?


> Usually apacheds store only lower case
> name of attributes (values are stored correctly).

ADS stores Attributes in two different ways :
- User provided form
- normalized form

In fact, the normalized form is computed from the UP form.

> this leads to a big
> problem even with somethink like this:
>
> ldap = LDAP.newInstance('ldap://XXXX:10389/','XXXX' ,'XXXX')
>
> results = ldap.search('(objectClass=ipProtocol)',
> 'nmb=ipProtocols,nmb=local,dc=habdank,dc=pl', SearchScope.ONE )
>
> for (entry in results) {
>  println entry.dn
>  println entry.ipProtocolNumber
> }
>
> because in apacheds name of second attribute is sometimes stored as:
> ipprotocolnumber, and sometimes as ipProtocolNumber (god know why, but
> i dont...).

It should not be the case with ADS 1.5.x. We internally do the
conversion from the String given by the user to the AttributeType OID.
So whatever name you give, it should return the value.



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

Mime
View raw message