Since this hasn't been discussed here in a while, I thought I'd give it a try.
I'm trying to get an LDAP connection working with the MDS simulator. I've searched around the various BB forums and haven't seen any solutions other then it just might be broken, period.
My setup :
- Eclipse 3.4.1 with BB JDE plugin 220.127.116.11
- BB JDE component packages 18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52
- with the corresponding MDS sim's
- BlackBerry Email & MDS Services Simulators 4.1.2
- BB JDE 4.7.0
- various device simulators
I set up the MDS config files with the LDAP connection information per the config file info :
[LDAP HANDLER] |
# ou = organizational unit
# o = organization name
application.handler.ldap.DEFAULT_SERVER = dhobbs-wnt
application.handler.ldap.DEFAULT_PORT = 389
application.handler.ldap.DEFAULT_QUERY = ou=people, o=rim.net
application.handler.ldap.DEFAULT_LIMIT = 20
application.handler.ldap.COMPRESSION = true
application.handler.ldap.logging = false
Names/values changed to protect the innocent. I wrote a simple standalone Java program to test my company's LDAP connection and it works fine. I put those same setting into the MDS config file.
I tried this example BB Java program from the API docs :
h t t p : //w w w.blackberry.com/developers/docs/4.1api/net/rim/device/api/ldap/package-summary.html
package com.ldap.test; |
public class LDAPTest extends UiApplication
public static void main( String args )
new LDAPTest ().enterEventDispatcher();
public LDAPTest ()
// create query object
LDAPQuery query = new LDAPQuery();
// host to contact; port; base query to use
query.setAuthType( LDAPQuery.LDAP_AUTH_ANONYMOUS );
//THIS DOES ASK FOR USER DN & PASSWORD CREDENTIALS
query.setAuthType( LDAPQuery.LDAP_AUTH_SIMPLE );
// scope of query
// The scope determines what entries are returned from a query.
// * A "base"-level scope ("LDAPQuery.LDAP_SCOPE_BASE") returns the
// entry addressed by the base query.
// * A "one"-level scope ("LDAPQuery.LDAP_SCOPE_ONE") returns all
// the entries one level below the entry addressed by the base query.
// * A "sub"-level scope ("LDAPQuery.LDAP_SCOPE_SUB") returns all
// the entries below the entry addressed by the base query.
query.setScope( LDAPQuery.LDAP_SCOPE_BASE );
// attributes to be return from the query
query.addAttribute( "cn" );
// filter to apply to the results
// start query
// results of query are stored in an enumeration type var
Enumeration enum1 = query.getResults();
if (query.getErrorCode() == LDAPQuery.LDAP_ERROR_SERVICE_UNAVAILABLE_EXCEPTION )
System.out.println("*** FAILED ***\n" );
System.out.println("\n*** SUCCESS ***\n" );
I've tried this with various MDS simulators and device simulators I have installed and trying out various parameters. I've turned on all the MDS logging settings I can find. Yes, simulator proxy settings work, I can browse my company's internal & external web just fine.
Yes, same negative results with Eclipse and with the BB JDE.
I'm getting NOTHING back from the MDS sim, no indication that the LDAP query is working other then
If I switch the authorization type :
query.setAuthType( LDAPQuery.LDAP_AUTH_SIMPLE )
The BB sim does ask for the user/password, but still nothing.
Has anyone had any success with LDAP & MDS simulator ?