AnsweredAssumed Answered

Create User whit web-service-client.jar (Urgent)

Question asked by salvatore on Sep 8, 2006
I have a problem whit the creation of new user.
On my application, I have copied all libraries .jar from Alfresco lib (otherwise the application return NotFoundClassDefException). This is the code:

try { 
AuthenticationServiceSoapBindingStub authenticationService =
      (AuthenticationServiceSoapBindingStub) new AuthenticationServiceLocator().getAuthenticationService();
   AuthenticationResult result = authenticationService.startSession("admin","admin");
   String ticket = result.getTicket();

NamedValue namedV = new NamedValue();

        NewUserDetails newUser = new NewUserDetails();
        AdministrationServiceSoapBindingStub adminStub = WebServiceFactory.getAdministrationService();

        UserDetails[] userD = adminStub.createUsers(new NewUserDetails[ ]{newUser});
} catch (Exception e){out.print("ECCEZIONE: "+e);}

The last error is:

This is referred to creation of new AuthenticationServiceLocator() (I think).
Without the method "startSession", the method "createUsers" return always this error: "WSDoAllSender: password callback class provided null or empty password".
Can you help me, please??