Does anyone see what I am doing incorrectly here? I am attempting to
output a valid ldif file, but I am only getting one value even though
I am passing an array of values to the constructor.

Thanks in advance...

---------------------------------
sample code
---------------------------------

FileOutputStream objOutput = new FileOutputStream("c:\\output.ldif");
                        
PrintWriter objPrintWriter = new PrintWriter(objOutput);

LDIFWriter objWriter = new LDIFWriter(objPrintWriter);

LDAPAttributeSet objAttributeSetOutput = new LDAPAttributeSet();

String strAttributeOutputName = "objectClass";
String strOutputValues[] = { "inetOrgPerson", "organizationalPerson",
"person", "ndsLoginProperties", "top", "homeInfo" };

LDAPAttribute objAttributeOutput = new
LDAPAttribute(strAttributeOutputName, strOutputValues);

objAttributeSetOutput.add(objAttributeOutput);

LDAPEntry objEntryOutput = new
LDAPEntry("cn=murban,ou=westcoastops,ou=people,ou=corp",
objAttributeSetOutput);

objWriter.printEntry(objEntryOutput);

objPrintWriter.flush();

----------------------------------
resulting output
---------------------------------

dn: cn=murban,ou=westcoastops,ou=people,ou=corp
objectClass: inetOrgPerson

Reply via email to