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

help! why referral is hidden?



hello ,everybody,

I'm puzzled when I use JNDI with referral, i set "java.naming.referral" to
"ignore", but the return result doesn't including the "ref" attribute which
belong to objectclass "referral". here is my referral ldif
==============================================
dn: o=subtree,dc=example,dc=com
ref: ldap://computer:389/o=subtree,dc=example,dc=com
objectclass: top
objectClass: extensibleObject
objectclass: referral
o: subtree
cn: aaaabbbb
==============================================


I use codes provide by JNDI tutorial, which is like below
==============================================
     DirContext ctx = new InitialDirContext(env);

     // See its attributes
     Attributes attrs = ctx.getAttributes("o=subtree,dc=example,dc=com");

     System.out.println(attrs);

     // Close the context when we're done
     ctx.close();
==============================================


but result is
============================================
{objectclass=objectClass: top, extensibleObject, referral, o=o: Êб¾¼¶,
cn=cn: aaaabbbb}
============================================

I got all attributes except for "ref", who can tell me why and how could I
do?! anybody encountered the same problem with JNDI?!

Thanks a lot ,everybody!!!

______________________________________

===================================================================