java - Using UnboundID SDK In-Memory Directory Server in Android App Code -
i have tried implementing unbound id in memory directory server simulating ldap directory testing purpose. code works fine java application ldif file sample directory data. when use in android application code, application aborts saying "it unable find or load class inmemorydirectoryserverconfig" . below key code snippet use connect in memory ldap server.
inmemorydirectoryserverconfig config = new inmemorydirectoryserverconfig("dc=example,dc=com"); directoryserver = new inmemorydirectoryserver(config); directoryserver.importfromldif(true, getclass().getresource("example6.ldif").getpath()); directoryserver.startlistening(); ldapconnection = directoryserver.getconnection(); searchrequest searchrequest=new searchrequest(techmbasedn, searchscope.sub,filter.createequalityfilter("uid", name),"givenname","uid");
kindly let me know whether possible simulate directory server in android app ldif file , or not possible use code in android app.
i've never tried it, i'm not aware of reason in-memory directory server wouldn't work on android.
my guess you're trying use minimal edition of ldap sdk in app. minimal edition has stripped-down set of classes allows lot of ldap communication doesn't have lot of optional stuff in-memory directory server. if switch standard edition should have better luck.
if that's not problem, i'm not sure cause (unless it's ldap sdk jar file isn't in classpath, don't think that's case since looks have earlier ldapconnection variable defined). see exact error message you're getting try diagnose problem.
Comments
Post a Comment