Yes, that what I am doing but my client is throwing  
ERR_02014_UNSUPPORTED_OPERATION The method 
org.apache.directory.ldap.client.api.EntryCursorImpl.beforeFirst() is not 
supported'

my simple client code is        Entry cursor = connection.search(searchDn, 
"(objectclass=*)", SearchScope.SUBTREE);

typecasting does not work

-----Original Message-----
From: Emmanuel Lécharny [mailto:[email protected]] 
Sent: Friday, September 01, 2017 1:03 PM
To: Apache Directory Developers List <[email protected]>
Subject: Re: EntryFilteringCursor question



Le 01/09/2017 à 17:47, Sathyanarayan, Harish a écrit :
> I am intercepting the search request via custom interceptor and searching a 
> third-party ldap but want to return back the result to the client. However I 
> cannot return the EntryFilteringCursorImpl. Any techniques to achieve this by 
> passing the result to the client. I have an EntryCursor with mutltiple 
> entries.  Next(searchContext) is not going to work obviously.
>
> Am overriding this
> @Override
> public EntryFilteringCursor search(SearchOperationContext 
> searchContext) throws LdapException

Results are managed by the cursor the interceptor is retruning. If you 
interceptor get the results from a remote LDAP server, bypassing teh rest of 
the chain, than you need to wrap a cursor around the entries you get, and 
return this cursor ::

    public EntryFilteringCursor search( SearchOperationContext searchContext ) 
throws LdapException
    {
        EntryFilteringCursor cursor = <grab the data from the remote LDAP 
server>

        return cursor;
    }

--
Emmanuel Lecharny

Symas.com
directory.apache.org

The information contained in this electronic mail transmission may be 
privileged and confidential, and therefore, protected from disclosure. If you 
have received this communication in error, please notify us immediately by 
replying to this message and deleting the email and its attachments from all 
computers without copying or disclosing it.

Reply via email to