info@yenlo.com
eng
Menu
WSO2 Enterprise Integrator 3 min

How to find WSO2 Admin Services payloads for testing

Bas Verhoog
Bas Verhoog
Integration Consultant
20201119 how to find wso2 admin services 600x350 1

20201119-how-to-find-wso2-admin-services-600x350 After finishing deployment of your WSO2 product(s), you want to run automatic tests. The Carbon platform, which forms the basis of WSO2, provides so-called Admin Services to perform administrative tasks, like adding integrations or checking whether you or your scripts added the right users and roles. You could also check that all your Service Providers were added and configured as expected. In this blog, I will introduce these services to you. In part 2 of this blog series, I will explain how to use these services and in part 3 of the series I provide insight on how you can automate this process.

Finding Admin Service definitions

If you want to make use of SOAP endpoints, of course you’ll need to know which endpoints to call. Furthermore, once you’ve found the endpoints, which payload and headers do you need?

I’ll assume you already downloaded any WSO2 product from their website. Make sure you don’t grab any WSO2 Enterprise Integrator versions newer than 6.x, as they no longer make use of the Admin Services! Each product’s process for starting to work with Admin Services is the same; an example is the page for the Enterprise Integrator.

When listing the services, you’ll find URLs at the end of each line. The output would be like this:

20201119-output-admin-services-url Figure 1: Listing Admin Services

Adding ?wsdl at the end, you get the location of the WSDL; which is a definition of the SOAP service in the WSO2 product. Opening that link in the browser will show an XML definition of the service, as described in the above EI documentation.

This is the first step towards using the Admin Services to test your deployments!

Extracting payloads

For this step, it would be best to install SoapUI. It can be used to extract all operations from a file written in the Web Services Definition Language (WSDL). This is in essence an XML file that defines all operations in the service. In SoapUI, make a new SOAP project. Then, use the URL you found above for the AdminService you want to import the definition of. This will look somewhat like the following screenshots shows:

20201119-new-soap-project Figure 1: Importing a WSDL via the admin service’s URL

SoapUI will add a new project in the left pane, with two child entries. This allows you to either use SOAP11 or SOAP12 to call the Admin Services. I used SOAP12 for this blog. Each of these folders will have a number of operations under them, as shown in the following figure:

20201119-service-operations-listed-by-SoapUI

Figure 2: A service’s operations listed by SoapUI

They include the payloads you need to send for each operation. At the bottom of this screen, click on Auth, then click the dropdown and add a new Basic Authorization setup. Supply it with the default username and password, “admin” and “admin”. You can see an example in the screenshot below:

20201119-SoapUI-operation-window

Figure 3: The SoapUI operation window after calling an admin service

Conclusion

You now have all the elements you need to start testing! You can use software like SoapUI itself or Postman to make requests to the URLs you found, using the payloads from above in order to specify which data you want to add/edit/delete. From there, you can also list data to verify if your operation succeeded. Keep an eye out for part 2 of this blog series, which will be online soon, where I explain how to use these services with Postman!

If you have any questions regarding this blog, feel free to leave a comment below. In case you need support, discover our Managed Services Supportoptions or contact us for advice.

eng
Close