Enrique Rodriguez a écrit :

On 5/30/07, Emmanuel Lecharny <[EMAIL PROTECTED]> wrote:

...
is it asap enough for you ? :)


1)  LdapUrl works great.  However, it doesn't look like I can use it
directly in searches using CoreContextFactory.  LDAP URLs are
supported by Sun JNDI for remote searches, since LDAP URL's are parsed
client-side by a Sun provider.

Yes, I think we don't support LdapURL in CCF.


However, with CCF, as in the following code:

{code}
CoreContextFactory ccf = new CoreContextFactory();
DirContext ctx = ( DirContext ) ccf.getInitialContext( env );

String url = "ldap://localhost:"; + port +
"/ou=users,dc=example,dc=com?krb5PrincipalName?sub?([EMAIL PROTECTED])";

NamingEnumeration answer = ctx.search( url, "", null );
{code}

I get:

javax.naming.InvalidNameException: Bad DN :
ldap://localhost:1024/ou=users,dc=example,dc=com?krb5PrincipalName?sub?([EMAIL PROTECTED]) at org.apache.directory.shared.ldap.name.LdapDnParser.parseInternal(LdapDnParser.java:151) at org.apache.directory.shared.ldap.name.LdapDN.<init>(LdapDN.java:197)

Certainly I can work around this by using LdapUrl's getters as
parameters to my ctx.search#.  Should this be supported?  Want a JIRA?

You can fill a JIRA asking for CCF to support LdapURL, sure.

Emmanuel

Reply via email to