JndiUtil syntax
Hi,
I m trying to query an ldap server from within a form.
However the description of the paramaters to the search method
are not well documented.
The code below connects to the ldap server ok, but always returns
zero entries. I think I have my filter correct (it looks fine in the
ldap server log files), but I am not so sure
about the scope, timeLimit and countLimit attributes.
Am I missing anything with those attributes?
Has anyone done this successfully. I am using IDM 6.0
Thanks for any help,
John I
<invoke name='search' class='com.waveset.util.JndiUtil'>
<map>
<s>host</s>
<s>hostname.example.com</s>
<s>port</s>
<s>389</s>
<s>baseDn</s>
<s>dc=example,dc=com</s>
<s>bindDn</s>
<s>uid=uid=somebody...</s>
<s>bindPass</s>
<s>somePassword</s>
<s>ssl</s>
<s>false</s>
<s>searchDn</s>
<s>ou=groups,dc=example,dc=com</s>
<s>filter</s>
<concat>
<s>(uniqueMember=uid=</s>
<ref>aPerson</ref>
<s>ou=tree,dc=york,dc=ac,dc=uk)</s>
</concat>
<s>attributes</s>
<null/>
<s>scope</s>
<s>subTree</s>
<s>timeLimit</s>
<s>10000</s>
<s>countLimit</s>
<s>10000</s>
</map>
</invoke>
[1686 byte] By [
johni] at [2007-11-26 6:57:46]

# 2
Try with something like this :
MyLDAP is a configurated resource in idm.
<block>
<defvar name='List'>
<list/>
</defvar>
<dolist name='Elements'>
<invoke name='getResourceObjects' class='com.waveset.ui.FormUtil'>
<ref>context</ref>
<s>top</s>
<s>MyLDAP</s>
<map>
<s>searchContext</s>
<s>ou=groups,dc=example,dc=com</s>
<s>searchFilter</s>
<concat>
<s>(uniqueMember=uid=</s>
<ref>aPerson</ref>
<s>ou=tree,dc=york,dc=ac,dc=uk)</s>
</concat>
<s>searchScope</s>
<s>onelevel</s>
<s>searchAttrsToGet</s>
<list>
<s>uniqueMember</s>
</list>
</map>
</invoke>
<append name='List'>
<get>
<ref>Elements</ref>
<s>uniqueMember</s>
</get>
</append>
</dolist>
<filterdup>
<ref>List</ref>
</filterdup>
</block>
VinZ at 2007-7-6 15:33:19 >

# 3
Nice workaround but it misses the point.
As I see it you will bind with the parameters as set up in the MyLDAP resource definition... i.e. you will be searching as a manager (cn=Directory Manager OR an id set up for IdM which has rights to add/delete/modify entries in MyLDAP)
This may or maynot be wanted.
What the originator of this thread wanted is to be able to bind with an id of his choosing and this dont happen with the search method of com.waveset.JndiUtil
Also why must we specifically have to add the providerutil.jar to $WSHOME/WEB-INF/lib? Cant the IdM installer be made to add this .jar if JndiUtil uses the CharacterEncoder.class