Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

All WSO2 products, including WSO2 API Manager (and all WSO2 products) is , are built on top of the WSO2 Carbon kernel. Management of WSO2 Carbon is done through managed internally using SOAP Web services known as admin services. All WSO2 products come with a management console UI, which communicates with these Web admin services underneath to facilitate administration capabilities through the UI.

However, there can be instances when you want to call these backend Web services directly. For example, in test automation, to minimize the overhead of having to change automation scripts whenever a UI change happens, developers prefer to call the underlying services in scripts (WSO2 test automation framework . WSO2 Test Automation Framework is built for this purpose).

These backend Web services are secured to prevent anonymous invocations. In order to invoke them, the user must be authenticated first. Common types of security protocols are as follows:

  • HTTP basic authentication over SSL
  • WS-Security username token
  • Session based authentication

After being authenticated, you can invoke the admin services. The example below shows how to invoke admin services that are secured with HTTP basic authentication mechanism, using Given below is an example of invoking an admin service using a SOAP client.

Example: accessing the key validate service of the API Manager

The steps below show how to invoke the UserAdmin Web service, which is secured with the HTTP basic authentication mechanism (there are other admin service as well, such as ServiceAdmin, StatisticsAdmin, ProxyAdmin etc.) To invoke the service, we use the soapUI (4.5.1 or later).

...

  1. Open https://localhost:9443/services/UserAdmin?wsdl in your browser to check if it is accessible.

    Note

    By default, the WSDLs of admin services is hidden from consumers. Before consumers import it to

...

  1. a SOAP client, a system admin must enable it

...

  1. by setting <HideAdminServiceWSDLs>false</HideAdminServiceWSDLs> in <PRODUCT_HOME>/repository/conf/carbon.xml file and

...

  1. restarting the server

...

 

...

  1. There are many admin services such as ServiceAdmin, StatisticsAdmin, ProxyAdmin etc. We use UserAdmin in this example

    .

    Open https://localhost:9443/services/UserAdmin?wsdl in your browser and check whether it is accessible.

  2. Create a SOAP Web service project in the soapUI

    ,

    using the above WSDL.

  3. We invoke Select listAllUsers operation under UserAdminSoap11Binding interface and click on the SOAP request. This invokes the listAllUsers operation exposed through UserAdmin Web service. Select listAllUsers operation under UserAdminSoap11Binding interface and click on
  4. Click the Aut tab at the bottom of the request editor and give the admin credentials of your server in order to submit listAllUsers SOAP request using HTTP basic authentication headers.
    Image Added

  5. Enter the following values for the parameters of the SOAP request.

 

 

  1. Code Block
    <xsd:filter>*</xsd:filter>
    <xsd:limit>100</xsd:limit>
  2. You can now submit requests to the UserAdmin Web service and receive SOAP responses.