Previous | Next | Trail Map | Tips for LDAP Users | Frequently Asked Questions

Attributes

When I ask for one attribute, I get back another. Why?

The attribute name that you are using might be a synonym for another attribute. In this case, the LDAP server might return the canonical attribute name instead of the one that you supplied. When you look in the Attributes returned by the server, you need to use the canonical name instead of the synonym.

For example, "fax" might be a synonym for the canonical attribute name "facsimiletelephonenumber". If you ask for "fax", the server will return the attribute named "facsimiletelephonenumber". See the Directory Operations (in the Tips for LDAP Users trail) lesson for details on synonyms and other issues regarding attribute names.

How do I get back an attribute's value in a form other than a String or byte array?

Currently you can't. The LDAP provider returns only attribute values that are either java.lang.String or byte[]. See the Miscellaneous (in the Tips for LDAP Users trail) lesson.

How do I know the type of an attribute's value?

An attribute's value can be either java.lang.String or byte[]. See the Miscellaneous (in the Tips for LDAP Users trail) lesson for information on which attributes' values are returned as byte[]. To do this programmatically, you can use the instanceof operator to examine the attribute value that you get back from the LDAP provider.


Previous | Next | Trail Map | Tips for LDAP Users | Frequently Asked Questions