7.3. Configuring the WFS

After deploying but before using the WFS service, you need to edit the config.xml file to make the service run properly. The config.xml file is in the WEB-INF directory of the WFS web application. The WEB-INF is a subfolder of the application folder, which is generally named after the WAR file and itself is a subfolder of the webapps folder in the Tomcat installation directory. This may be different if you use another servlet container.

For example, assume that the WFS web application was deployed under the context name citydb-wfs. Then the location of the WEB-INF folder and the config.xml file in a default Apache Tomcat installation is shown below.

../../_images/wfs_config_file_path_fig.png

Fig. 7.1 Location of the WEB-INF folder and the config.xml file.

Open the config.xml file with a text or XML editor of your choice and manually edit the settings. In the config.xml file, the WFS settings are organized into the main XML elements <capabilities>, <featureTypes>, <operations>, <constraints>, <postProcessing>, <database>, <server>, and <logging>. The discussion of the settings follows this organization in the subsequent clauses.

Table 7.5 Configuration settings of the WFS service
Settings
Description
Define service metadata that shall be used in the capabilities document of the WFS service.
Control which feature types shall be advertised and served by the WFS service.
Define the operation-specific behaviour of the WFS.
General constraints that influence the capabilities of the WFS service and of the advertised operations.
Allow for specifying XSLT transformations to be applied to the CityGML data before sending the response to the client.
Connection details to use for connecting to a 3D City Database instance.
Server-specific options and parameters.
Logging-specific settings like the log level and output file to use.

Caution

An XML Schema for validating the contents of the config.xml file is provided as file config.xsd in the subfolder schemas. After every edit to the config.xml file, make sure that the it validates against this schema before reloading the WFS web application. Otherwise, the application might refuse to load, or unexpected behavior may occur.

Environment variables

In addition to the config.xml file, the WFS supports the following environment variables to configure further settings. The variables must have been set prior to starting the service.

Table 7.6 Environment variables supported by the WFS service
Environment variable
Description
VC_WFS_CONFIG_FILE
With this variable, you can specify a configuration file that shall be used instead of the default config.xml file in the WB-INF directory when starting the WFS service. The variable must provide the full path to the configuration file. The WFS service must have read access to this file.
VC_WFS_ADE_EXTENSIONS_PATH
Allows for providing an alternative directory where the WFS service shall search for ADE extensions (default: ade-extensions folder in the WEB-INF directory). The WFS service must have read access to this directory.