On 4/18/11 9:13 AM, Narendra Kadali wrote:
Hi Cordialement,

Thanks for your reply.

I need to perform this persistent search operation on Active Directory . For 
Active Directory OID for persistent search is 1.2.840.113556.1.4.528 which is 
diffrent from standard oid 2.16.840.1.113730.3.4. So how can i change defined 
PersistentSearchControl  OId to this new OID.

You can't. The OID is not a variable, it's used to determinate exactly the Control you are using.

What you can do is to use an instance of the OpaqueControl class :

         Control psearchControl = new OpaqueControl( "1.2.840.113556.1.4.528" );
         SearchRequest sr = new SearchRequestImpl();
         sr.setBase( new Dn( "ou=system" ) );
         sr.setFilter( "(objectclass=*" );
         sr.setScope( SearchScope.SUBTREE );
         sr.addControl( psearchControl );

It should work.

You can also ask for the addition of the ActiveDirectory PersistentSearch 
control by creating a JIRA.

PS: And again, we all thanks a lot the f*ckers at M$ who decided to use a 
different OID than the standard one ... :/


--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to