How to create a new user using SIM API

Hi,

I would like to create a user on SIM using the API. I have created a remoteSession object. I need to know how to proceed further. I want to create a user and assing him some resources. Please let me know what methods need to be called in order to create a user and assign him resources.

Thanks!

[317 byte] By [the-gryphona] at [2007-11-26 21:01:15]
# 1

Use the following code snippet to start with creating a user

WSUser wsUser = new WSUser();

wsUser.setAccountId(name);

wsUser.setPassword(new com.waveset.util.EncryptedData("password"));

com.waveset.server.InternalSession session = new com.waveset.server.InternalSession();

LighthouseContext ctx = session.getAuthenticatedContext("Configurator");

java.util.Map maps = new java.util.HashMap();

maps.put("authorized","true");

ctx.checkinObject(wsUser,maps);

bchackoa at 2007-7-10 2:32:38 > top of Java-index,Web & Directory Servers,Directory Servers...