cancel
Showing results for 
Search instead for 
Did you mean: 

changePassword error

grosisimo
Champ in-the-making
Champ in-the-making
Hi

I need to change a user password via web services, so I was trying to use the method changePassword in the class AdministrationServiceSoapBindingStub.
I don't know the old password, so I fill the second parameter with null as I read in the documentation, but I get "Non nillable element 'message1' is null.".

The main part of the source code is

AuthenticationUtils.startSession("admin", "admin");
AdministrationServiceSoapBindingStub admin = WebServiceFactory.getAdministrationService();
admin.changePassword(username, [b]null[/b], newpassword);
AuthenticationUtils.endSession();

When I fill the second parameter with the right old password, it works.
Thanks
1 REPLY 1

grosisimo
Champ in-the-making
Champ in-the-making
Solved

The problem was I was using alfresco 2.1. Taking a look at the source code, i saw it didn't check whether the user was or not the admin. In alfresco 2.9 the source was different and it did check, so I installed an alfresco 2.9 night built and it worked.

Please, next time someone says "just set null as the old password", advice you are talking about alfresco 2.9.

Thanks anyway