Skip to Content
0
Former Member
Dec 18, 2007 at 03:36 PM

updating UME Attributes through JAVA

14 Views

Hi,

I have wrote some code and below is a section where I am trying to update a UME attribute, but it appears not to be working.

Has anyone done anything like this......

String [] val = new String[1];

try{

IUserAccountFactory accountFactory = UMFactory.getUserAccountFactory();

IUserAccount account = accountFactory.getUserAccountByLogonId(myuser);

IUserAccount mutableAccount = accountFactory.getMutableUserAccount(account.getUniqueID());

val[0] = "6";

mutableAccount.setAttribute("com.sap.security.core.usermanagement", "*attributename*", val);

mutableAccount.save();

mutableAccount.commit();

} catch (UMException e) {

response.write("<br>Problem: " + e.getLocalizedMessage());

}// End catch (UMException e).....

Attribute appears not to be set to any value, but can read the value from this attribute, so must be in the setAttribute that is missing.

Many thanks