I'm wondering what the best way is to access user defined attributes on accounts from jsp pages.
I see two possibilities:
Which way is the way to go? Does it matter? Does it make a difference whether it is a single server install or a multiple server install?Code:(1) Via soap admin call: spAdmin = new SoapProvisioning(); spAdmin.soapSetURI("https://"+mServer+":"+mPort+ZimbraServlet.ADMIN_SERVICE_URI); spAdmin.soapZimbraAdminAuthenticate(); zimbraAccount = sp.getAccount(accountId, true); sp.modifyAttrs(zimbraAccount, mAttrs); (2) Via direct library call: prov = Provisioning.getInstance(); account = prov.get(AccountBy.fromString("id"), accountId); prov.modifyAttrs(account, mAttrs, true);


LinkBack URL
About LinkBacks

