J
JScoobyCed
Hi,
I am performing a DirContext.search(...)
The parameters of the filter are binary (byte[]).
I have triied to encode as String the byte[], but it returns no result:
public Attributes getUserByObjectSid(byte bSidP) {
String strSid = new String(bSidP,"xxx"); // I triied several encoding
SearchControl sc = getSearchControl();
NamingEnumeration ne = null;
ne = ctx.search("DC=qa","(objectSid="+strSid+")",sc);
//...
}
but the search() returns no element...
The bSidP parameter comes fom a different search query on a different
Active Directoryserver.
The env.put("java.naming.ldap.attributes.binary", "objectSid")
is used to make sure I have the right byte[]
Thanks for any help.
I am performing a DirContext.search(...)
The parameters of the filter are binary (byte[]).
I have triied to encode as String the byte[], but it returns no result:
public Attributes getUserByObjectSid(byte bSidP) {
String strSid = new String(bSidP,"xxx"); // I triied several encoding
SearchControl sc = getSearchControl();
NamingEnumeration ne = null;
ne = ctx.search("DC=qa","(objectSid="+strSid+")",sc);
//...
}
but the search() returns no element...
The bSidP parameter comes fom a different search query on a different
Active Directoryserver.
The env.put("java.naming.ldap.attributes.binary", "objectSid")
is used to make sure I have the right byte[]
Thanks for any help.