The Axis2 Artifact Validator allows you to validate the archive files or
configuration files of the Apache Axis2 services (.aar files) or modules
(.mar files). Since an Apache Axis2 Web service is packaged as a file with
the .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.
Validating an Axis2 Artifact
Validating a service or a module before it is deployed is useful because it
assures the validity of the service.
Figure 1: Validating an Axis2 Service Artifact
We can use two methods to validate a service. We can either provide an
archive file (.aar file) or a service file (services.xml), or a module
descriptor (module.xml file).
First lets consider the scenario of validating an AAR or MAR file.
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.
Next, lets consider the other option, namely, directly pointing to a
services.xml or module.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.
In the navigator, under Tools, click Service Validator.
The Service Archive Validator page appears.
Validating a service archive file
Under Select an AAR (Service Archive), click
Browse and select the service archive you want to
validate.
Click Validate AAR.
This validates the service.xml you have selected. In an AAR
validation, the services.xml file inside the archive is extracted and
validated.
Validating a service.xml file
Under Select a Service.xml, click
Browse and select the service.xml file you want to
validate.
Click Validate Service.xml.
Once the validation process is complete, the results will be displayed on the
Service Archive Validation Report page.
In the navigator, under Tools, click Module Validator.
The Module Archive Validator page appears.
Validating a service archive file
Under Select an AAR (Service Archive), click
Browse and select the module archive you want to
validate.
Click Validate MAR.
This validates the module archive you have selected. In an AAR
validation,the module.xml file inside the archive is extracted and
validated.
Validating a module.xml file
Under Select a Module.xml, click
Browse and select the module.xml file you want to
validate.
Click Validate Module.xml.
Once the validation process is complete, the results will be displayed on the
Service Archive Validation Report page.
Validation Results
In the validation process (services.xml validation), the tool parses the
services.xml against a schema and looks for any invalidities. If any are
found, they are presented under Warnings and Information, on the
Service Archive Validation Report.
Figure 2: Tabular form of validation results