Issues with LDAP XPCOM API in Thunderbird

"[email protected]" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.directory
Organization http://groups.google.com
Message-ID <[email protected]>
Hello,

I'm trying to use the LDAP API in Thunderbird to make a non-anonymous,
password-enabled, search -- which is not possible with
nsILDAPSyncQuery AFAIK.
So I played a bit with the low-level API, i.e. nsILDAPConnection,
nsILDAPOperation and nsILDAPMessageListener in particular.
I didn't go very far as calling nsILDAPOperation.simpleBind()
constantly threw a 0x8059005b error.
So I went on using the LDAP shell test file from Mozilla source tree
[1] but that produced the same result...
In the XPC shell, I simpy executed something like :

  createConn("localhost", 389, "c=domain,c=local");
  simpleBind("password");
  searchExt("c=local", Components.interfaces.nsILDAPURL.SCOPE_SUBTREE,
            "([email protected])", [], []);

Again, I ran into the simpleBind() issue :

  [Exception... "Component returned failure code: 0x8059005b
[nsILDAPOperation.simpleBind]"  nsresult: "0x8059005b (<unknown>)"
location: "JS frame :: /home/damiano/ldapshell.js :: simpleBind ::
line 250"  data: no]damiano@suricat:/local/CVS_1_8/mozilla/obj-i686-pc-
linux-gnu/mail/dist/bin

Any idea why ? Has anyone succeeded in using this API in Thunderbird ?

Thanks a lot,

[1] http://mxr.mozilla.org/mozilla1.8/source/directory/xpcom/tests/ldapshell.js

--
Damiano ALBANI
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.