Testing a Schema Using the Schema Editor

The following section explains how to test a schema using the 'Test Schema' option in the schema editor Tools menu. Use this option when a schema is being edited.

Note: Before a schema can be tested, a service using this schema must have been registered.

You need to create an 'instance' XML document (a document with test data plugged in) based on the schema. The Test schema dialog provides the tools to create the instance, edit it, execute it and save it for future use.

Creating the request document

The first thing you have to do when you invoke the Test Schema Dialog is to create an initial instance of the request document, based on the schema currently being edited.

1. Select the transactionType: The transaction type combo displays a list of possible transactions for this service, depending on the service type (page, list or search).

2. When the transaction type is SRCH and more than one search type is available, the search type combo displays the list of available search types for this service, based on the schema definition. You must choose the search option. The combo on the right shows which fields are required by each search type.

3. Click Create. A tree representation of the request instance is displayed on the left TreeView.

Viewing/Editing the request instance

The tree view only displays elements of the request document. To display the list of attributes for an element, click that element. The attributes are displayed on the grid on the right. You may modify the value directly on the grid. If you need to enter a long textual value, click the button "..." at the right of the attribute.

By default the editor provides predefined values for 'commonly' used attributes such as AccountID, PersonID, PremiseID, BillID and SAID for an account shipped on the demo database. You may change them directly on the grid.

The request can be viewed on the tree or as text on a browser page. Use the toggle toolbar button to switch between modes.

Saving the request instance

To save a request instance, click Save. A save dialog box is displayed.

Executing the request

Once you've finished editing the request, you can execute it (send it using HTTP to the XAI servlet).

1. Enter the URL address of the XAI servlet. It appears at the right of the Execute button.

2. Click Execute to send the request.

3. The response is displayed on the Response tab.

Viewing the response

The response received as a result of executing the request, is displayed on the 'response' tab. It can be shown in a tree mode, similar to the request, or on a Web browser page. Use the toggle toolbar button to switch between modes.

Saving the response

You can save the response to an XML file.

1. Click Save to File.

2. Select a file name from the file dialog