SearchResult searchResult = null;
if (namEnum.hasMore()) {
searchResult = (SearchResult) namEnum.next();
// Build the User DN
userDN = searchResult.getName() + "," + sAPPEND_BASE_DN;
} else {
// User not found
throw new NamingException(" Invalid Username ");
}
System.out.println("User DN="+userDN);
</code>
Nessun commento:
Posta un commento