Global Schema Cache

Overview

The Schema Cache contains XML Schemas that can then be used globally by Schema Validation filters. XML Schemas can be imported from either XML Schema files or WSDL files. WSDL files often contain XML Schemas that define the elements that in SOAP messages. To facilitate this, API Gateway Explorer can import WSDL files from the file system, from a URL, or from a UDDI registry.

When the XML Schema has been imported into the cache, and selected in a Schema Validation filter, API Gateway Explorer retrieves the schema from the cache instead of fetching it from its original location. This improves the runtime performance of the filter, but also ensures that an administrator has complete control over the Schemas that are used to validate messages.

From the main menu, select File > View Schema Cache. The list of schemas in the cache is listed in the Imported Schemas table. You can also view the contents of any of these schemas by clicking the schema in the table. The schema contents are displayed in the Contents text area.

At any stage, you can manually modify the contents of the schema in the text area. To save the modified contents to the cache, click the Update button.

Adding Schemas to the Cache

To add an XML Schema to the cache, click the Add button at the bottom of the Schema Cache screen. The Load Schema dialog offers two possible locations from which you can load a schema—from an XML Schema file directly, or from a WSDL file.

Select the From XML Schema radio button to load the schema directly from a schema file, and then click Next. On the next screen, enter or browse to the location of the schema file using the field provided. You can also enter a full URL here to pull the schema from a web location. Click the Finish button to import the schema into the cache.

Alternatively, if you want to load the schema file from a WSDL file, select the From WSDL radio button on the Select Schema Source screen, and then click the Next button.

The WSDL file can be located from the file system, from a URL, or from a UDDI registry. Select the appropriate option, and enter or browse to the location of the WSDL file in the fields provided. If you wish to retrieve the WSDL file from a UDDI registry, click the WSDL from UDDI radio button, and click the Browse UDDI button. The Browse UDDI Server for WSDL dialog enables you to connect to a UDDI, and search it for a particular WSDL file. For detail, see the topic on Retrieving WSDL files from a UDDI registry.

When importing the schema from the WSDL file, you can also check the WSDL file for compliance with the WS-I Basic Profile. The Basic Profile consists of a set of assertions or guidelines on how to ensure maximum interoperability between different implementations of Web services. For example, there are recommendations on what style of SOAP to use (for example, document/literal), how schema information should and should not be included in WSDL files, and how message parts should be defined to avoid ambiguity for consumers of WSDL files.

API Gateway Explorer can test WSDL files while extracting schemas from them for conformance against the recommendations laid out in the Profile. A report is generated showing exactly which recommendations have passed and which have failed. While a WSDL file that does not conform to the Profile can still be imported, there is no certainty that consumers of the Web service can use it without encountering problems.

[Important] Important

To run the WS-I compliance test, the WS-I Test Assertions Document (TAD) file must be installed on the machine on which the API Gateway Explorer is running. This file is available from www.ws-i.org. The full path to the location of this file (for example, c:/WSI/SSBP10_BP11_TAD.xml must be specified in the API Gateway Explorer global preferences. To configure this setting, select the Window > Preferences option from the main menu. For more details, see General Preferences.

To run the WS-I compliance test on a WSDL file, select Tools > Run WS-I Compliance Test in the main menu, and specify the WSDL file to import the schema in this screen. Click OK to run the WS-I Analysis tools run in the background in API Gateway Explorer.

The results of the compliance test are displayed in your browser in a WS-I Profile Conformance Report. The overall result of the compliance test is displayed in the Summary section. The results of the WS-I compliance tests are grouped by type in the Artifact: description section. For example, you can access details for a specific port type, operation, or message by clicking the appropriate link in the Entry List table. Each Entry displays the results for the relevant WS-I Test Assertions.

Schema Validation

The Schema Validation filter is used to validate XML messages against schemas stored in the cache or in the Web Services Repository. The filter is in Validate Message category of filters, which is available in the Design Mode of the API Gateway Explorer GUI. For more details, see the topic on Schema validation.