This documentation is for WSO2 Identity Server 5.0.0. View documentation for the latest release.
Writing a Web Service Client for Authentication and User Admin Services - Identity Server 5.0.0 - WSO2 Documentation
||
Skip to end of metadata
Go to start of metadata

This topic demonstrates the usage of the remote-user-mgt sample with the WSO2 Identity Server. This sample provides a means of writing a Web service client for authentication and user administration services. 

Prerequisites

Configuring the sample

  1. Create a folder in your local machine and navigate to it using your command line.
  2. Download the Java sample by entering the following.

    svn co http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/is/5.0.0/modules/samples/user-mgt/remote-user-mgt/

    The location of this folder will be referred to as <remote-user-mgt_HOME> from this point onwards.

  3. Open the <remote-user-mgt_HOME>/build.xml file and update the ${wso2is.home} value with your IS home. Do this by modifying the wso2is.home property in a manner similar to the following.

    <property name="wso2is.home" value="/Users/Sam/Documents/IS/SampleTest/wso2is-5.0.0/"/>
  4. Update the RemoteUMSampleConstants.java file with the directory that your WSO2 Identity Server instance is located. For example, the code will look similar to the following.

    public static final String IS_HOME ="/Users/Sam/Documents/IS/SampleTest/wso2is-5.0.0/";
  5. Start the Identity Server using the start up script found in the <IS_HOME>/bin directory.
    • Use wso2server.sh for Linux.
    • Use wso2server.bat for Windows.
  6. Download and install Apache Ant if you have not already done so.
  7. Modify the <remote-user-mgt_HOME>/client.properties file if the default configuration to run the sample is different. For example, if you have changed the password for your user, you need to update it here.
  8. Open a command line interface and navigate to the <remote-user-mgt_HOME> directory.
  9. Run the ant command at this directory level in the command line and observe the different user management operations performed remotely.
  10. Log in to the Identity Server and go to Users and Roles in the Configure menu in the management console
  11. Click Users and you can now view the users created in the list using the sample.

Note: The service stubs are available at WSO2 Maven Repository and can be added as dependencies to the project. Also, you can generate the service stubs from the WSDL file available at https://localhost:9443/services/<ServiceName>?wsdl

In order to access the WSDL file, update the following configuration in the <IS_HOME>/repository/conf/carbon.xml file.

<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>
  • No labels