directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Russell <jonoruss...@us.ibm.com>
Subject [Attribute writing] Writing non-string attributes
Date Thu, 17 Jan 2013 16:22:25 GMT
<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">Hello,<div><br></div><div>I'm
trying to write an array of bytes as an attribute in LDAP. I'm trying to do this without converting
it into a string. So I have the following in my LDIF:<br><br></div><div><br></div><div><div>dn:
m-oid=1.3.6.1.4.1.18060.0.9.3.1.9, ou=attributeTypes, cn=other, ou=schema</div><div>objectclass:
metaAttributeType</div><div>objectclass: metaTop</div><div>objectclass:
top</div><div>m-oid: 1.3.6.1.4.1.18060.0.9.3.1.9</div><div>m-name:
ibm-imm</div><div>m-description: the actual block data being stored</div><div>m-equality:
caseIgnoreIA5Match</div><div>m-ordering: caseIgnoreOrderingMatch</div><div>m-substr:
caseIgnoreSubstringsMatch</div><div>m-syntax: 1.3.6.1.4.1.1466.115.121.1.15</div><div>m-length:
32700</div><div>m-singleValue: TRUE</div></div><div><br></div><div><div>dn:
m-oid=1.3.6.1.4.1.18060.0.9.5.1.2, ou=objectClasses, cn=other, ou=schema</div><div>objectclass:
metaObjectClass</div><div>objectclass: metaTop</div><div>objectclass:
top</div><div>m-oid: 1.3.6.1.4.1.18060.0.9.5.1.2</div><div>m-name:
DeploymentBlock</div><div>m-description: Deployment information</div><div>m-must:
cn</div><div>m-must: ibm-imm</div><div>m-may: name</div><div>m-may:
uid</div><div>m-may: uniqueIdentifier</div><div>m-may: fileName</div><div>m-may:
profileName</div><div>m-may: status</div><div>m-may: ou</div></div><div><br></div><div><br></div><div>In
my actual code, I have the following:</div><div><div>&nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; ServerEntry newEntry = service.newEntry (new LdapDN
(dnString));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; newEntry.add ("objectClass", "top", "DeploymentBlock");</div><div>&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newEntry.add ("ou", baseString);</div><div>&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newEntry.add ("name", "deployment");</div><div>&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newEntry.add ("cn", &lt;something
unique&gt;);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; newEntry.add ("ibm-imm", &lt;the block data&gt;);</div><div>&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; service.getAdminSession ().add (newEntry);</div><div>&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OfmLogHandler.DEBUG ("Done adding block!");</div></div><div><br></div><div>When
I run my code, I find the entry in Apache Director Studio, but the attribute associated with
the block data ("ibm-imm") is not there. When I try to read back the data:</div><div><br></div><div>&nbsp;serverEntry.get
("ibm-imm"), it says that it's null. So I'm obviously writing the data incorrectly, but I'm
not sure how. Is my syntax for ibm-imm not correct?</div><div><br></div><div>Thanks,</div><div>Jon
Russell</div></font>

Mime
View raw message