This blog post explains on how to invoke admin services provided by WSO2 Carbon Products. I have implemented a sample code tested with WSO2 Identity Server.
In this blog post I will briefly explain on how to update the password via admin service.
I will use both AuthenticationAdmin and UserAdmin services to update the password.
- AuthenticationAdmin will be letting users to log in to the system.
- UserAdmin provides the API "changePasswordByUser" to update the logged in user's password.
WSDL files of Admin Services can be viewed by following steps.
- Update the value of "HideAdminServiceWSDLs" element to false in carbon.xml. Located inside
- WSDL file to a corresponding admin service can be viewed by browsing to to the URL.
:[PORT] /services/[ADMIN_SERVICE] ?wsdl
Once done with the stub generation, Only thing left now is to invoke the relevant stubs to perform necessary operations. First thing you should do is to login by using the AuthenticationAdminStub. During the logging in process, the stub returns the cookie. By using that cookie, you can proceed with your subsequent operations.
The complete code can be downloaded from here.