Portal Webservice for getting portal roles in Visual Composer part I of this weblog I have described a webservice which returns all
portal roles resp. the portal roles of a certain user. In the second part I
want to describe how to test the webservice and how you can use it in Visual
Now we can test the webservice select your webservice and then click on the test button as it is shown in the following screenshot. Later we need the WSDL (Web Services Description Language) for using the webservice in Visual Composer.
Now we get all the Webservice methods. In this case we only have the method getAllPortalRoles.
On the next screen we have the possibility to enter the input parameters and execute the method. The getAllPortalRoles has no input parameters.
The getPortalRolesForUser has an input parameter the User ID.
In this example I call the getAllPortalRoles and get the following result with all portal roles in a list.
After we have tested the webservice we can use it in Visual Composer. You have to login to Visual Composer. Then create a new model or open an existing model. Then select in the menu under Tools => Define Web Service System…
You have to enter a system name and alias and the WSDL that’s it finish it by clicking on create. In my example I use my development portal called leda. After you have created the web service system you have to add an iView and then you can search for your system
Then we use the webservice in our model as it is shown in the next screenshot.
Then we deploy the model and get the following application.
You can create also the web service system for the getPortalRolesForUser and use it like I have described it for the getAllPortalRoles web service. That’s it. Now you can use the Web Services in all your Visual Composer Models.