Several parameters of the Wrapper program are controlled by a pair of configuration files, which need to be included in the classpath used by the JVM running the Wrapper. The files can be edited using any standard text editor, but changes to the files only take effect when the Wrapper program is restarted. Each file consists of several lines of key=value pairs.

wrapper.properties

The wrapper.properties file controls the HTTP port and keystore password used by the Wrapper. As distributed, the file is:

org.soagate.wsswrapper.wrapper.httpport=7123
org.soagate.wsswrapper.wrapper.keystorepass=secret

The first key value, org.soagate.wsswrapper.wrapper.httpport, controls the port used by the HTTP server integrated into the Wrapper. This is the port supporting both the WS-Security service access function (using the path /wrapper) and the Web browser interface for certificate upload (using the path /cert).

The second key value, org.soagate.wsswrapper.wrapper.keystorepass, defines the password used by the Wrapper to access its key store. The actual key store file is named .keystore, and must be located in the same directory from which the Wrapper is launched. There should normally be no need for Wrapper users to work directly with this file, but the password is included in the configuration to allow organizations to set a different password without needing to recompile the code.

log4j.properties

The log4j.properties file controls the logging output generated by the Wrapper components. As distributed, the file is:

# change logging level here.
log4j.rootCategory=INFO, LOGFILE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d %-5p %c - %m%n

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=wrapper.log
log4j.appender.LOGFILE.Append=false
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

Most of these values should not be modified unless you have a good understanding of Log4J. The one value which is most important to developers using the Wrapper is the first key value, log4j.rootCategory, which controls the logging output from the Wrapper. The first value in this line ("INFO", as shown) determines the level of detail which will be output to the log file during execution of the Wrapper program. The "INFO" level says that only basic information should be output during normal operation, along with full details of any error condition. Changing this to "ERROR" or "FATAL" will eliminate even the basic information normally output to the log. If this value is changed to "DEBUG", detailed information will be output during even the normal operation of the Wrapper, including the content of documents being processed by the Wrapper.

The normal destination for logging output is defined by the file name given as the log4j.appender.LOGFILE.File value. The specified file is overwritten each time the Wrapper is restarted, so if you want to preserve the output you need to make a copy before restarting. Unless a full file path is supplied as the value, the log file is created in the same directory from which the Wrapper is launched.