[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Using ldap urls with Java JNDI



ldap urls (rfc1959, rfc2255) should work with jndi
searches, PROVIDER_URL's, or probably anyplace else
a (directory) context is specified.

i have working java examples using both jndi "search"
and "PROVIDER_URL" if you need them.

recognizing the absurdity of the example, the following 
should work:
ctx.search("ldap://ldap.bigfoot.com:389/c=US,o=hotmail.com";,
"(cn=laura padilla)", mailAttribute);

as far as i know, a valid server/port for the initial
dircontext is still needed (and proabably a better place
for an extended url) --  making my example more absurd.

scott

Laura Padilla wrote:
> 
> Hi,
>     Has anyone tried using ldap urls with Java JNDI?  I tried doing a
> search() using an ldap url and it didn't work.  I did somehting like
> this:
> 
>     DirContext ctx = new IntialDirContext();
> 
>     NamingEnumeration result =
> ctx.search("ldap://localhost:389/cn=laura,cn=Users,ou=MyOrg,o=MyCo,c=US.",filter,
> null);
> 
> Any comments, suggestions would be appreciated.
> 
> Laura