directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Swanson <m...@ScheduleWorld.com>
Subject Re: Q: LookupFilter doesn't receive useful info
Date Mon, 13 Dec 2004 21:02:52 GMT
On December 13, 2004 3:35 pm, Alex Karasulu wrote:
> Mark Swanson wrote:
> >Hello,
> >
> >1. I notice that not matter what the baseDN I connect with the
> >LookupFilter.filter() Name is always empty. Why is that?
>
> I do not know what the context of LookupFilter.filter() is.  Can't parse
> the question.

OK. Lemme try again: why is the LookupFilter.filter(Name dn) dn paramter 
always empty? (Or perhaps, what sort of query would set it?)

> >2. Why do the LookupFilter.filter() Attributes not reflect the lookup?
>
> Again don't have enough context info.
>
> >F.E.
> >ldapsearch -p 10389 -h lin -x -D "uid=admin,ou=system" -b
> >"ou=super,ou=contacts,uid=6760,dc=home2,dc=mark" -v -w secret "cn=a b"
>
> This ...
>
> "cn=a b"
>
> is not a valid search filter.  I think you're looking for something like
> this '(cn=a b)'. Oh and just as separate advice try to avoid " and use a
> ' to quote if you do not need substitution.

OK. I guess ldapsearch is forgiving my bad syntax as I get the same result 
with both. I'll use '(cn=a b)' from now on.

> >I would expect the dn and/or the attributes to contain "ou=super" but
> > neither do. In fact, the search request "cn=a b" isn't even available.
> > This means I'm unable to filter based on a single thing the user used as
> > a query/lookup parameter...
>
> Sorry Mark but I'm having a lot of trouble understanding you.  I think
> you're presuming I have more context in me head than I do.  Can you try
> again presuming I know nothing.

Sorry. I'll try again.

I have this entry:
cn=a b,ou=super,ou=contacts,uid=6760,dc=home2,dc=mark

I connect with a baseDN of ou=super,ou=contacts,uid=6760,dc=home2,dc=mark

I have this query: '(cn=a b)'

I have successfully inserted my own SWLookupFilter into eve.

SWLookupFilter.filter(LdapContext ctx, Name dn, Attributes entry) is called 
and I print out "dn" and "entry". I get the following:

dn: empty
entry: 
1. Apache Software Foundation
2. ou=system
3. dc=home2,dc=mark
4. cn=schema,ou=system

The problem/question is this: how is it possible for SWLookupFilter to do any 
sort of filtering or query rewriting when SWLookupFilter isn't presented with 
the query or baseDN? perhaps the baseDN is available in the LdapContext but 
looking at the API doesn't reveal it (to me at least).

Shouldn't the query be in the attributes? Or am I misunderstanding the purpose 
of the "Attributes entry" parameter?

Thank you.




-- 
Free SyncML-capable J2ME & J2SE replacement for Exchange and Outlook
http://www.ScheduleWorld.com/
WAP: http://www.ScheduleWorld.com/sw/WAPToday?id=4000&tz=EST
WebDAV: http://www.ScheduleWorld.com/sw/webDAVDir/4000.ics
VFREEBUSY: http://www.ScheduleWorld.com/sw/freebusy/4000.ifb

Mime
View raw message