Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

IP Phone SDK LDAPProvider

I am using the LDAPProvider java function to search a corporate directory. The problem I am finding is that it just appends ou=users to the ldap root to do the search instead of using a search base and filter. This means that if all your your users are not in the ou=users,ou=ldaproot you won't get any results.

Anyone have a workaround for this problem?

1 REPLY

Re: IP Phone SDK LDAPProvider

Hmm.. are you sure about that? I don't see any ou=users anywhere in the code. However, the methods that make use of it, do always provide ou=users hardcoded. E.g. the searchUsers method in Users.java calls the ldap search class via

Vector answer = lp.sendRequest("ou=Users", filter, true, searchCtrls);

Needless to say that if you write your own code that uses LDAPProvider, don't call it with sendRequest("ou=Users"...) but instead with whatever fits your directory.

You will in fact see that in the same Users.java, there's another method getControlledPhones where ou=Users is not used:

Vector answer = lp.sendRequest("ou=profiles, ou=CCN", matchRules, true, searchCtrls);

So it really comes down to a proper initialization and sending the proper request. E.g. you really cannot use Users.java's User.searchUsers as it doesn't provide a means to specify the ou... however, you can take User.java's User.searchUsers as a template on how to use the LDAPProvider class, and consult a JSP page that makes use of the Users class (e.g. the photodirectory) to see how to initialize the LDAPProvider.

149
Views
0
Helpful
1
Replies
СоздатьДля создания публикации, пожалуйста в систему