Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
brianchilders
Posts: 1
Registered: ‎09-10-2008
My Device: Not Specified

LDAP Library questions

I am using the BB-JDE 4.6.0.12.

 

My question is if I am required to authenticate into the LDAP Server, how do I accomplish this?

 

LDAPQuery query = new LDAPQuery();

query.setAuthType(LDAPQuery.LDAP_AUTH_SIMPLE);

 

I looked in the API, and there isn't any .set() for Principal and Password.

 

Thank you for any light you can shed on this.

 

-brian

 

New Developer
jrebeiro
Posts: 9
Registered: ‎09-13-2008
My Device: Not Specified

Re: LDAP Library questions

I too have been looking for an answer to this. There is ZERO information about doing LDAP lookups in the API.

 

There is the sample application in the API documentation but it's very basic and doesn't even work for me using the MDS simulator.

 

I  tried doing:

 

 

LDAPPasswordCache passcache = new LDAPPasswordCache(); passcache.setPassword(ldapServer, ldapBaseDN, ldapUserDN, ldapPass);

 But the JDE complain:

 

C:\src\test\RIMLDAPTest.java:24: LDAPPasswordCache() has private access in net.rim.device.api.ldap.LDAPPasswordCache

 

Any help would be appreciated as I need to get LDAP results from our internal LDAP servers inside my app!

 

 

 

 

New Developer
katrinaniolet
Posts: 23
Registered: ‎07-26-2008
My Device: Not Specified

Re: LDAP Library questions

Don't use 'new LDAPPasswordCache()', use 'LDAPPasswordCache passcache = LDAPPasswordCache.getInstance();'
New Developer
jrebeiro
Posts: 9
Registered: ‎09-13-2008
My Device: Not Specified

Re: LDAP Library questions

That gives me a build error:

 

C:\src\test\RIMLDAPTest.java:42: cannot find symbol
symbol  : class getInstance
location: class net.rim.device.api.ldap.LDAPPasswordCache
      LDAPPasswordCache passcache = new LDAPPasswordCache.getInstance();