Hi everyone,
I have to write a program in C++ that generates a valid LDIF file (both related to the LDIF syntax and LDAP schema). It is possibile to do without having a running LDAP server? Any suggestion for libraries that helps for this task? (e.g. something similar to Xerces-C++ for XML).
Thanks, Marco
--On December 13, 2007 7:04:18 PM +0100 canaparo marco.canaparo@cnaf.infn.it wrote:
Hi everyone,
I have to write a program in C++ that generates a valid LDIF file (both related to the LDIF syntax and LDAP schema). It is possibile to do without having a running LDAP server? Any suggestion for libraries that helps for this task? (e.g. something similar to Xerces-C++ for XML).
LDIF is defined by RFC. Read the RFC and get the rules for generating LDIF.
http://www.rfc-editor.org/rfc/rfc2849.txt
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
Quanah Gibson-Mount ha scritto:
--On December 13, 2007 7:04:18 PM +0100 canaparo marco.canaparo@cnaf.infn.it wrote:
Hi everyone,
I have to write a program in C++ that generates a valid LDIF file (both related to the LDIF syntax and LDAP schema). It is possibile to do without having a running LDAP server? Any suggestion for libraries that helps for this task? (e.g. something similar to Xerces-C++ for XML).
LDIF is defined by RFC. Read the RFC and get the rules for generating LDIF.
therefore I've to conclude that there is no open source library enabling to write a program which creates and serializes well-formed LDIF data to be used as active entries.
Thanks, Marco
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc
Zimbra :: the leader in open source messaging and collaboration
Hello,
LDIF is defined by RFC. Read the RFC and get the rules for generating LDIF.
therefore I've to conclude that there is no open source library enabling to write a program which creates and serializes well-formed LDIF data to be used as active entries.
Writing to LDIF files are easy, just a base64 encoder needed. Parsing is complicated a bit. Just an example in KDE's ldif class (it's not pure C++, but Qt):
http://websvn.kde.org/trunk/KDE/kdepimlibs/kldap/ldif.cpp?revision=695569&am...
Just see the LDIF::assembleLine function.
Thanks, Marco
Regards, György
canaparo wrote:
Quanah Gibson-Mount ha scritto:
LDIF is defined by RFC. Read the RFC and get the rules for generating LDIF.
therefore I've to conclude that there is no open source library enabling to write a program which creates and serializes well-formed LDIF data to be used as active entries.
The logical foundation for your conclusion is unclear. For Java for instance there's JLDAP. Specifically the classes:
com.novell.ldap.util.LDIFReader com.novell.ldap.util.LDIFWriter
Reductio ad absurdum. QED.
Jon Roberts www.mentata.com
openldap-software@openldap.org