hasdy
Sep 19th, 2007, 04:54 PM
I have my base dn set in the LdapContextSource within the applicationContext configuration.
Sometimes when I'm doing a lookup I have the full DN string of a user (inc. base dn). So when I create a DistinguishedName object with that DN string, and do a lookup.... it won't find it but if I strip out the base dn, it will.
So... I suppose I have to strip out the base dn from my string.
Without hardcoding the base dn in my code, I was thinking I could grab it from the contextSource..... but how do I get this?
The ldaptemplate only has a setContextSource and no get.... so is there an easy way to grab that basedn value?
OR is there even an easier way to approach this?
thanks!
Sometimes when I'm doing a lookup I have the full DN string of a user (inc. base dn). So when I create a DistinguishedName object with that DN string, and do a lookup.... it won't find it but if I strip out the base dn, it will.
So... I suppose I have to strip out the base dn from my string.
Without hardcoding the base dn in my code, I was thinking I could grab it from the contextSource..... but how do I get this?
The ldaptemplate only has a setContextSource and no get.... so is there an easy way to grab that basedn value?
OR is there even an easier way to approach this?
thanks!