Hi Saman,
Thats good to hear from you.
Now im stuck with SSL Handshake problem while changing my userPassword attribute. It gives the certificate for PKIX is not found in the path. Could you please let me know how can i set the certificate while using SoapProvisioning. Please let know the clear instructions of applying the certificate parameters. Please find my code as follows.
public static void testChangePassword(String userName, String newPassword)
throws Exception {
ZimbraLog.test.debug("testDeleteAccount()");
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.j ndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://IPADDRESS:389");
env.put(Context.SECURITY_PRINCIPAL,"uid=zimbra,cn= admins,cn=zimbra");
// env.put(Context.SECURITY_PROTOCOL,"ssl");
// env.put(Context.SECURITY_PRINCIPAL,"uid=zimbra,cn= admins,cn=zimbra,dc=localhost,dc=localdomain");
env.put(Context.SECURITY_AUTHENTICATION,"simple");
env.put(Context.SECURITY_CREDENTIALS,"zimbra123");
DirContext ctx = new InitialDirContext(env);
System.setProperty("javax.net.ssl.trustStore", "mykeystore");
System.setProperty("javax.net.ssl.trustStorePasswo rd", "123456");
SoapProvisioning sp = new SoapProvisioning();
sp.soapSetURI(SERVER_URL
+ ZimbraServlet.ADMIN_SERVICE_URI);
sp.soapAdminAuthenticate("uid=zimbra,cn=admins,cn= zimbra,dc=test,dc=zmb,dc=com","zimbra123");
Account account = sp.get(AccountBy.name, userName);
String password = account.getAttr("userPassword");
sp.changePassword(account, password, newPassword);
}
Could you please let me know what is the mistake in the above code.
Its very urgent
Thanks,
Seshu |