Code example for XmlBeanFactory

    private Map<String, ClassConfig> classMap;
    private String user_dn;
    private String user_sdn;
    private ClassPathResource cpf = new ClassPathResource("ldap-auth.xml");
    private XmlBeanFactory bf = new XmlBeanFactory(cpf);
    public void setUp() throws GeneralSecurityException {
        host = "";
        port = 389;
        config = new MossoAuthConfig(host, port);
        dn = "ou=Users,o=rackspace";
        sdn = "cn";
        oClass = "(objectClass=*)";
        memberField = "groupMembership";
        userQuery = "cn=%s";
Connect your IDE to all the code out there  Get Codota for Java