Hi,
I am using the LDAPWriter component to add an entry to the LDAPServer.
Modifying the existing attribute was successful.But facing problem when I am trying to add an entry.
No of records processed is 0.Graph executes successfully.
So in order to add an entry I am reading from a flat file using UniversalReaderComponent.
My question here is should we have to give the input to LDAPWriter in some specific format ?
Or is there some other way to achive this?
Following is my node code
<?xml version="1.0" encoding="UTF-8"?>
<Graph author="Evergreen" created="Fri Nov 06 10:40:12 IST 2009" guiVersion="2.8.0" id="1257510213564" licenseType="Evaluation evaluation" modified="Wed Nov 11 18:42:05 IST 2009" modifiedBy="Evergreen" name="LDAP_Write" revision="1.63">
<Global>
<Metadata fileURL="${META_DIR}/whole_Records" id="Metadata0"/>
<Property fileURL="workspace.prm" id="GraphParameter0"/>
</Global>
<Phase number="0">
<Node dataPolicy="controlled" enabled="enabled" fileURL="${DATAIN_DIR}/one.ldif" guiHeight="0" guiName="UniversalDataReader" guiWidth="0" guiX="95" guiY="74" id="DATA_READER0" type="DATA_READER"/>
<Node action="add_entry" enabled="enabled" guiHeight="0" guiName="LDAPWriter" guiWidth="0" guiX="338" guiY="74" id="LDAP_WRITER0" ldapUrl="ldap://localhost:389" passThroughInputPort="0" passThroughOutputPort="0" password="****" type="LDAP_WRITER" user="cn=Directory Manager"/>
<Edge fromNode="DATA_READER0:0" guiBendpoints="" id="Edge3" inPort="Port 0 (in)" metadata="Metadata0" outPort="Port 0 (output)" toNode="LDAP_WRITER0:0"/>
</Phase>
</Graph>
I am using the LDAPWriter component to add an entry to the LDAPServer.
Modifying the existing attribute was successful.But facing problem when I am trying to add an entry.
No of records processed is 0.Graph executes successfully.
So in order to add an entry I am reading from a flat file using UniversalReaderComponent.
My question here is should we have to give the input to LDAPWriter in some specific format ?
Or is there some other way to achive this?
Following is my node code
<?xml version="1.0" encoding="UTF-8"?>
<Graph author="Evergreen" created="Fri Nov 06 10:40:12 IST 2009" guiVersion="2.8.0" id="1257510213564" licenseType="Evaluation evaluation" modified="Wed Nov 11 18:42:05 IST 2009" modifiedBy="Evergreen" name="LDAP_Write" revision="1.63">
<Global>
<Metadata fileURL="${META_DIR}/whole_Records" id="Metadata0"/>
<Property fileURL="workspace.prm" id="GraphParameter0"/>
</Global>
<Phase number="0">
<Node dataPolicy="controlled" enabled="enabled" fileURL="${DATAIN_DIR}/one.ldif" guiHeight="0" guiName="UniversalDataReader" guiWidth="0" guiX="95" guiY="74" id="DATA_READER0" type="DATA_READER"/>
<Node action="add_entry" enabled="enabled" guiHeight="0" guiName="LDAPWriter" guiWidth="0" guiX="338" guiY="74" id="LDAP_WRITER0" ldapUrl="ldap://localhost:389" passThroughInputPort="0" passThroughOutputPort="0" password="****" type="LDAP_WRITER" user="cn=Directory Manager"/>
<Edge fromNode="DATA_READER0:0" guiBendpoints="" id="Edge3" inPort="Port 0 (in)" metadata="Metadata0" outPort="Port 0 (output)" toNode="LDAP_WRITER0:0"/>
</Phase>
</Graph>
-
Hello,
LDAPWriter requires at least two fields in input metadata for adding entries to LDAP:- dn - it's a unique identifier of entry in LDAP hierarchy
objectClass - it specifies the type of entry in LDAP
The other fields in the input metadata depend on the value of objectClass field.
For example if the entry has objectClass="person" then the fields cn and sn are also required. They are mandatory for "person" object. "Person" object has also several optional attributes: userPassword, telephoneNumber, seeAlso and description. These fields can be in the input metadata but they aren't required.
For more information about mandatory and optional attributes of LDAP object, see LDAP documentation.
Petr -
Hi,
Thanks for that suggestion.
Can you clarify as to what kind of input files can I give to the input port of LDAPWriter
I mean should the file be a delimited or fixed or a ldif file?
Also is it we have use a ldif parser(custom java code or any) and then give the input to the LDAPWriter? -
Hey petr,
I got the solution for my problem.
I did made a point to keep the mandatory attributes.
I was successful in inserting the data to target LDAP
Thanks a ton for the reply :D
Please sign in to leave a comment.
Comments 3