Announcement Announcement Module
Collapse
No announcement yet.
Arabic support for search parameters Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Arabic support for search parameters

    Hello,
    While querying Ldap with Arabic attribute value, the LdapTemplate didn't fetch any results although the value does exist on ldap and fetched by JXplorer
    Spring configuration:

    Code:
    <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
            <property name="url" value="${ldap.url}"/>
            <property name="userDn" value="${ldap.userDn}"/>
            <property name="password" value="${ldap.password}"/>
            <property name="base" value="${ldap.base}"/>
        </bean>
    
        <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
            <property name="contextSource" ref="contextSource"/>
        </bean>
    and Search Code:

    Code:
    AndFilter filter = new AndFilter();
    filter.and(new EqualsFilter("cn", username)); \\contains Arabic value
    usersList = ldapTemplate.search("", filter.encode(), userAttributesMapper);
    Using JNDI LDAP i was able to find the Arabic value, but using the spring template nothing is fetched, am I missing some special configuration of this is an encoding support issue in the search?

    Please advice!

  • #2
    Could you print the values of username and filter.encode(), please?

    Comment

    Working...
    X