.. _cli: Command-Line mode =================== To use TAPValidator in automated tests of TAP-VAMDC nodes, command-line mode can be employed. To get full list of supported options, call program with "-h" option:: $ java -jar target/TAPValidator-12.07.jar -h You will get a list of options with their descriptions, like:: Usage: prog [options] [filename1.xsams]...[filenameN.xsams] Available options: -u, --tap_url "value" : TAP-VAMDC service TAP endpoint URL e.g. -u http://service:port/TAP/ -u http://service:port/tap/ -c, --capabilities_url "value" : TAP-VAMDC service capabilities endpoint URL, e.g. -c "http://service:port/VOSI/capabilities" or -c "http://service:port/tap/capabilities/" Only first specified service will be used. -p, --prettyprint : Re-format input XML -t, --temp_dir "value" : Directory for temporary files. Usually, system default is used. If this directory is not writeable, using memory storage -s, --schemalocation "value" : No namespace Schema location to validate output against -n, --nsschemalocation "value" : Space-separated list of pairs of namespace url and relevant schema location to validate output against -q, --query "value" : VSS1/VSS2 Query to send to service. Can be specified multiple times to do multiple queries on the same tapservice -o, --output_dir "value" : Folder where to save result files. Needs to be specified to initiate command-line mode -h, --help : Print usage and exit All options except -h and -o can be specified both in GUI and in command-line mode, option -q in GUI mode has no effect. If option is specified in GUI mode, it overrides the specific setting, so, for example, multiple instances of validator may be called simultaneously to test several services and compare results. XSAMS document location may be passed as the last parameter. It will be validated in gui or command-line mode depending on presence of **-o** option. Command-line operation ------------------------- To initiate command-line mode, you must specify output directory for resulting documents and reports. If capabilities endpoint is not specified, it will be taken from the program settings. If no queries are specified, TAPValidator tries to validate all node sample queries. For each query validator saves document it got from service, in filename xsams(N).xml and validation report for it in report(N).xml, where N is an incrementing index, starting from 0 on each run. WARNING! Validator will deny to overwrite any files, so before running it, make sure that output directory doesn't contain files from previous run. Report file format -------------------- TAPValidator generates reports in its own XML format, defined by report.xsd schema. Report documents look like:: http://vamdc.fysast.uu.se:8888/node/vald/tap/capabilities/ http://host.name:8080/tap/ true Select * where radtranswavelength < 85; 2011-04-08+02:00 xsams0.xml 1 11 0 0 0 0 0 12 0 1 0 0 StarkBroadening cvc-complex-type.2.4.a: Invalid content was found starting with element 'StarkBroadening'. One of '{Name, Comments, SourceRef, Broadening}' is expected. StarkBroadening cvc-complex-type.2.4.a: Invalid content was found starting with element 'StarkBroadening'. One of '{Name, Comments, SourceRef, Broadening}' is expected.