Get method in the Attribute class. in JNDI

I had connected to the AD

// Create the initial directory context

DirContext ctx = new InitialDirContext(env);

Attributes attrs = ctx.getAttribute("DC=DomainDnsZones,DC=testing,DC=local");

but I had no idea wat to get from the attrs.get method.

as in, I don't know what kind of attributes ID are available inside my attrs

is there any coding to get all the attribute ID so tat I can use the get method to retrieve them?

[464 byte] By [AdrianHBKa] at [2007-11-27 8:41:21]
# 1

We can get the available Attributes for a particular user.....

using Attributes class for a Search and Context....

You can try out the free LDAP viewer available in internet (Its a Applet)... u can find the possible Attribute Names in that... and use the below statement..

Attributes attrs1 = ctx.getAttributes("CN=" + "user,CN=Users,DC=domain,DC=dmn,DC=com");

String office = (String)attrs1.get("physicaldeliveryofficename").get();

netjagana at 2007-7-12 20:40:16 > top of Java-index,Core,Core APIs...
# 2
Have a look at any of my previous posts. Some of them illustrate how to retrieve attributes from AD.
adler_stevena at 2007-7-12 20:40:16 > top of Java-index,Core,Core APIs...
# 3
If I wan to know is there any child node after the root. how to find out? is there any coding? is it using the search function?
AdrianHBKa at 2007-7-12 20:40:16 > top of Java-index,Core,Core APIs...
# 4
I'm sory, but I just couldn't help replying.If I wan to know is there any child node after the root. how to find out? is there any coding? Yesis it using the search function? Yes
adler_stevena at 2007-7-12 20:40:16 > top of Java-index,Core,Core APIs...