Hi people, I'm trying to use webservice to create new user. I use the following code:
// To fill the person properties
private NamedValue[] createPersonProperties(
String homeFolder,
String firstName,
String lastName,
String email,
String orgId)
{
// Create the new user objects
return new NamedValue[] {
new NamedValue(Constants.PROP_USER_HOMEFOLDER, Boolean.FALSE, homeFolder, null),
new NamedValue(Constants.PROP_USER_FIRSTNAME, Boolean.FALSE, firstName, null),
new NamedValue(Constants.PROP_USER_LASTNAME, Boolean.FALSE, lastName, null),
new NamedValue(Constants.PROP_USER_EMAIL, Boolean.FALSE, email, null),
new NamedValue(Constants.PROP_USER_ORGID, Boolean.FALSE, orgId, null) };
}
// The main function
…
NamedValue[] properties = createPersonProperties(…data…);
NewUserDetails[] newUser = new NewUserDetails[]{new NewUserDetails(user.getUserName(), password, properties)};
try {
administrationService.createUsers(newUser);
// and the upper line crash, it produces RemoteExceptio
What's wrong? I'm confused, thanks a lot.