Performing XML Consistency Checks

The adapter also includes a utility for checking the consistency of XML syntax. This utility applies adapter-specific logic to the contents of the configuration file, providing more advanced syntax validation than a generic parser.

Checking for consistency detects whether the internal syntax dependencies are met. For example, the SQL attribute of the method element is either required or optional, depending on the value of the handlerType attribute. Since the SQL attribute is not required for all methods, it is defined as optional in the adapter DTD. The consistency checker verifies that this attribute is specified for particular handlerType values that require it.

To check XML consistency, add the <install_dir>/bin directory to your PATH environment variable and execute the following at a command prompt:

On Microsoft Windows:

tibhawkdbhma --name <servicename> -xml_file <filename> -check_only

On UNIX:

tibhawkdbhma -xml_file <filename> -check_only

Where, <filename> is the complete path to the configuration XML file and <servicename> is the Windows service name given to this instance of the adapter.

Note: The <servicename> for the default service installed is <database>DBHma, where <database> is either oracle, sybase, or sqlserver.

When this option is used, starting the adapter checks the XML syntax only. It does not communicate with the local Hawk agent or connect to the database. Any syntax errors are displayed in the console window where the command was run. The adapter process stops automatically after checking completes.