Previous Topic: SPML Feed

Next Topic: Flow of the SPML Feed Command

SPML Feed Command Options

Options can have three names: the short command line name (-s), the long command line name (--serverURL) and the property file name (serverURL).

-b, --batchSize, batchSize

Integer value that defaults to 1. If this number is greater than 1, requests will be submitted as batch requests, with this value determining how many requests are placed in each batch.

By batching multiple requests together, performance can be improved because less time is spent performing TCP socket and SOAP setup, at the expense of additional memory usage. The memory used depends on the size of your requests, but setting batchSize to several hundred should pose no problem.

Note: batchSize should be always be 1 if your template is for a search or batch request, as these cannot be placed inside a batch request.

-d, --daemon, daemon

Causes the application runs in daemon mode.

-x, --explodeOnly, explodeOnly

The template is exploded using the data files as normal. However, instead of sending the resulting request to the SPML server, it is written to stdout (or a file if output or daemonResponseDir is set).

-h, --help

Display help for the command line switches to stdout.

-i, --inputFileNames, inputFileNames

Specifies a text file. Each line in the text file is used as the name of an input file. This is an alternative method of listing input files on the command line itself. The set of input files is the union of those listed in this file and those listed on the command line.

-l, --logging, logging

Specifies a properties file to configure the Java logging system instead of using the default logging system. See the documentation for the java.util.logging.LogManager class for details.

-m, --mappingFile, mappingFile

Specifies a CSV file in a special format that maps parts of the input files to Velocity variable names. The variable names defined in this file can be referenced in the Velocity template file. If there is a mapping to a variable named timestamp, this has a special meaning and is used to determine which records have been changed since the last run.

-o, --outputFile, outputFile

Specifies a file to record the output, overwriting any existing file. If you omit this option, and the daemonResponseDir property is not set, output is written to stdout.

-p, --password, password

Specifies the password to use to authenticate with the SPML server.

-f, --propertyFile

Specifies a property file with the options to use. You can specify any command line option (except -h and -f) in the properties file by setting a property that matches the option's long name without the - prefix. For example, -mapping becomes simply mapping in the properties file. Some options for daemon mode can only be set via a properties file. Any option specified on the command line replaces a setting from the properties.

-q, --quiet, quiet

Causes no output to appear unless a catastrophic failure occurs. In that case, an error message is output to stderr before the program exits.

-s, --serverUrl, serverUrl

The URL of the SPML server to send the request to.

-t, --templateFile, templateFile

Specifies a Velocity template file that can be merged with data from XML or CSV input files to produce an SPML request. The application runs in exploder mode; the input files are either XML or CSV files instead of SPML requests. Each record in the input files is applied to the template (after mapping to variable names via the mapping file) to produce an SPML request that is sent to the server.

Note: the template should not contain <?xml?> processing headers.

-u, --user, user

Specifies a user name to authenticate with the SPML Server. For the SPML Server, this option's value should be of the form domain\username.

-v, --verbose, verbose

Outputs additional information to stderr about the application's actions.

-V, --version, version

When the application starts, its name and version number is written to stderr.

Property File Only
timestampFile

Specifies a file used to record when input files have been processed. This is mainly useful in daemon mode to keep track of the latest run times when the daemon is shutdown temporarily or restarted.

daemonResponseDir

Specifies a directory to write SPML responses to when running in daemon mode. The SPML response from each run over an input file by the daemon is written to a new file in this directory. The output files have the same name as the input data file, with a digit appended. For example, if the file test.csv is processed for the first time, the response is written to test.csv.1, the second run to test.csv.2, and so on.

If you omit this option, all responses are written to the file specified with -o, or stdout if neither -o nor -q are present.

daemonSleep

Specifies the length of time in milliseconds to sleep between polling for data file changes. If this parameter is not specified, the length of sleep time is 30 seconds.