[Date Prev][Date Next] [Chronological] [Thread] [Top]

[java] Mixing inetOrgPerson and java objects in one entry



I can do the following seperately: 

Add inetOrgPerson: 

final static String newContext =
"cn=Trebor,o=Magna,c=US";
BasicAttribute objClasses = new
BasicAttribute("objectclass");
    objClasses.add("person");
    objClasses.add("organizationalPerson");
    objClasses.add("inetOrgPerson");

    BasicAttributes attrs = new BasicAttributes();
    attrs.put(objClasses);
    attrs.put("cn","Trebor");
    attrs.put("sn","Iksrazal");
    attrs.put("ou","hello_world");
    attrs.put("userpassword","24 Bytes wss DESede
key!");
    attrs.put("userCertificate;binary", userCert);

    ctx.createSubcontext( newContext, attrs );

Add java object: 

Integer i = new Integer( 28420 );
ctx.bind("cn=OBJ2,o=Magna,c=US", i);

How might I be able to do both as one dn entry? I
guess I'm asking how to mix the correct attributes. 

iksrazal

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you?re looking for faster
http://search.yahoo.com