I had a great idea for a little app to synchronise my personal LDAP server with my BB (on BIS) contact list. I know C#, and sit next to a knowledgeable java guy at work, so thought I would give it a try.
So, I've got myself an app set up using the JDE 4.7 beta, and the first thing I thought to try was to connect to my LDAP over the internet using the net.rim.device.api.ldap namespace. I simply try to do an anonymous bind and then fetch all the entries for a particular base DN. Here's my code:
Java pastebin - collaborative debugging tool
I've highlighted the section that makes the LDAP connection. I've fixed the hostname / querytype rather than read it from the form to make troubleshooting a little easier.
When I run it in the simulator (9530) it comes up with "Success: 0", meaning that it thinks the query was successful and it found 0 records. The problem is, running my LDAP server in debug mode shows that it doesn't even connect to the LDAP server, and there definately are records behind that DN.
So, has anyone had this sort of trouble before? Annoyingly, I can't test it on a real device until RIM gives me some code signing keys.