BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 09-21-2009, 06:39 PM   #1 (permalink)
New Member
Join Date: Jun 2008
Model: 8130
Carrier: Verizon
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default LDAP not working with MDS simulator ?

Please Login to Remove!

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
- BB JDE component packages,,,
- 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 :

# 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,
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

package com.ldap.test;


import java.util.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ldap.*;

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.setHost("",389,"o=blahblah. com,c=US");

query.setAuthType( LDAPQuery.LDAP_AUTH_ANONYMOUS );

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();

System.out.println("*** FAILED ***\n" );
System.out.println("\n*** SUCCESS ***\n" );
catch(Exception e)

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

query.getErrorCode = 127
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 ?


Last edited by mlucek : 09-21-2009 at 06:53 PM.
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Johnson Controls XP/XT 9100
Johnson Controls XP/XT 9100 pictureJohnson Controls XP/XT 9100
Johnson Controls XP/XT 9100 pictureJohnson Controls DX-9100
Johnson Controls DX-9100 pictureJohnson Controls DX-9100
Johnson Controls DX-9100 picture

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.