I am trying to use the web service to create and delete users. I've noticed that if I try to recreate a user that has already been deleted (using the web service) I get a duplicate user exception. I also noticed that the following entry in the node_properties table is still available for users that I've deleted using the web service:node_id actual_type string_value qname614 STRING alfrescotestuser3@test.com {http://www.alfresco.org/model/user/1.0}usernameAfter looking at the code for AdministrationWebService.createUsers() and AdministrationWebService.deleteUsers(), I found that AdministrationWebService.createUsers() contains a call to authenticationService.createAuthentication() and a call to personService.createPerson(). However, AdministrationWebService.deleteUsers() only calls personService.deletePerson() - it does not delete the authentication for that user. This, I believe, is the source of the duplicate user exception that is thrown if I try to create another user with the same username. I've also included an example below of how I am using the web service. Am I using it incorrectly? Is this a known problem with the web service?I'm using alfresco v1.3Any advice would be greatly appreciated!my code:
createAlfrescoUser() {
…
AuthenticationUtils.startSession(USER,PASSWORD);
NewUserDetails[] newUsers = new NewUserDetails[] {
new NewUserDetails(
username,
password,
new NamedValue[] {
new NamedValue(Constants.PROP_USER_EMAIL, false,email,null),
new NamedValue(Constants.PROP_USER_FIRSTNAME, false,"bogus",null),
new NamedValue(Constants.PROP_USER_LASTNAME, false,"bogus",null)}
)};
WebServiceFactory.getAdministrationService().createUsers(newUsers);
AuthenticationUtils.endSession();
…
}
deleteAlfrescoUser() {
…
AuthenticationUtils.startSession(USER,PASSWORD);
WebServiceFactory.getAdministrationService().deleteUsers(new String[] {usernameToDelete});
AuthenticationUtils.endSession();
…
}