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 1.0.0.67
- BB JDE component packages 4.5.0.16, 4.6.0.19, 4.6.1.27, 4.7.0.46
- 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 :
Quote:
[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
Quote:
package com.ldap.test;
import java.io.*;
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();
try
{
// host to contact; port; base query to use
query.setHost("ldap.blahblah.com",389,"o=blahblah. com,c=US");
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
//query.addFilter("cn");
// start query
query.start();
// 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" );
}
else
{
System.out.println("\n*** SUCCESS ***\n" );
}
}
catch(Exception e)
{
System.out.println(e.getMessage());
System.exit(1);
}
}
}
|
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 :
Quote:
|
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 ?
Thanks,
Mike