Click here to Skip to main content
15,892,809 members

Comments by Balaji_Reddy (Top 11 by date)

Balaji_Reddy 9-Jan-12 1:54am View    
Thanks for your kind reply.

I was trying the same but still i'm getting the same exception. I have posted my code here and plz tel me where is the problem.



Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://192.168.168.103:389");
env.put(Context.SECURITY_PRINCIPAL, "xxxxxx");
env.put(Context.SECURITY_CREDENTIALS, "yyyyy");
String entryDN = "uid=testuser, DC=example, DC=com";

DirContext dirContext = new InitialDirContext(env);

Attribute commonName = new BasicAttribute("cn", "Test User");
Attribute surName = new BasicAttribute("su", "myuserid");
Attribute userID = new BasicAttribute("uid", "testuser");

//Object class addition
Attribute objectClass = new BasicAttribute("objectClass");
objectClass.add("top");
objectClass.add("person");
objectClass.add("organizationalPerson");
objectClass.add("user");
objectClass.add("inetOrgPerson");

Attributes entry = new BasicAttributes(true);

entry.put(userID);
entry.put(commonName);
entry.put(surName);

entry.put(objectClass);
DirContext createSubcontext = dirContext.createSubcontext("cn=testuser,DC=example,DC=com", entry);

Balaji_Reddy 6-Jan-12 9:56am View    
its showing the following error . I just followed the same thing wat is mentioned URL


javax.naming.directory.NoSuchAttributeException:
Balaji_Reddy 19-Dec-11 9:18am View    
:) u r welcome
Balaji_Reddy 3-Nov-11 0:58am View    
Thanks for ur previous post.

I wan to store attribute value in a Bean.
here my xml goes


<root>

<name>xxxx


<name>yyy



Here I wan to read my attribute value using digester.
Balaji_Reddy 14-Jun-11 8:14am View    
i am asking solution for xslt . not in java or in .net.