Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 is built for this purpose).

These backend Web services are secured to prevent anonymous invocations through multiple protocols such as,. Common types of security protocols are as follows:

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

You can use any SOAP client and communicates with the admin services by authenticating through above security protocols.
In this post, I will take  you through consuming an admin service using soapUI since soapUI is the most user-friendly service testing tool out there to test SOAP or RESTful web services.
We will use HTTP basic auth authentication mechanism out of the auth options described above. If you like to use a different approach such as carbon session based authentication, you may refer toAfter 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 soapUI (4.5.1 or later).

Info

By default, the WSDLs of admin services is hidden from consumers. Before consumers import it to the SOAP client, a system admin must enable it as follows in <PRODUCT_HOME>/repository/conf/carbon.xml file and restart the server: <HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>

 

  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 the listAllUsers operation exposed through UserAdmin Web service. Select listAllUsers operation under UserAdminSoap11Binding interface and click on the SOAP request.