Archive Validator User Guide

Introduction

The Archive Validators are graphical tools available with WSO2 Web Services Application Server that allow the user to validate a Web Service or Web Services Module.

Since an Axis2 web service is packaged as a file with a .aar extension and a web service module is packaged with a .mar extension, the validators for services and modules are referred to as the AAR validator and MAR Validator respectively.

Usage

Validating a service or module before it is deployed can come in handy, because it will provide an assurance of the validity of the service in question. Using the Validator is quite easy, as with the other tools provided with the WSO2 Web Services Application Server.

Click on AAR or MAR Validator and you will be taken to the following screen.

AAR Validator UI

There are two different ways in which we can provide the tool with the service which needs to be validated. We can either provide a service archive (a .aar file) or a service descriptor (a services.xml file).

First lets consider the scenario of validating an AAR (A web service archive)

click on the Browse on the "Select an AAR" box to search your file system for the .aar file which represents the service archive you want to validate. Once you have selected it, click on the Validate AAR button to validate the services.xml inside it.

Note: In case of a AAR Validation what actually happens is that the services.xml file inside the archive is extracted and validated.

Next, lets consider the other option, namely, directly pointing to a services.xml file to validate.

Click on the Browse button in the "Select a services.xml" box to search your file system for the services.xml file which you want to validate. Once you have selected it, click on "Validate services.xml" button to validate the service descriptor.

In both of the above methods, when the validation process has completed, you will be taken to the results page. This page will display the validation results in tabular form.

Validation Results

If we take a closer look at the inner workings of the validation process, in services.xml validation, the tool parses the input services.xml against a schema and looks for any invalidities. If any are found, they are presented in a tabular form.

Conclusion

AAR validator provides a handy method of validating an AAR archive or a services.xml file and viewing the results in a tabular form.