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 located in the WEB-INF directory of the WFS web application. If you use Apache Tomcat, 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.


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>, <filterCapabilities>, <constraints>, <postProcessing>, <database>, <server>, and <logging>. The discussion of the settings follows this organization in the subsequent clauses.

Table 7.6 Configuration settings of the WFS service
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.
Define the filter operations that shall be supported in queries.
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.


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. They always take precedence over corresponding settings in the config.xml file.

Table 7.7 Environment variables supported by the WFS service
Environment variable
Used to specify the database system of the 3DCityDB the WFS service shall connect to. Allowed values are postgresql for PostgreSQL/PostGIS databases (default) and oracle for Oracle Spatial/Locator databases.
Host name or IP address of the server on which the database is running.
Port of the database server to connect to. Default value is 5432 for PostgreSQL and 1521 for Oracle, depending on the setting for CITYDB_TYPE.
Used to specify the name of the 3DCityDB instance to connect to. When connecting to an Oracle database, provide the database SID or service name as value.
Schema to use when connecting to the database. The defaults are citydb for PostgreSQL and the username specified through CITYDB_USERNAME for Oracle, depending on the setting for CITYDB_TYPE.
Connect to the database sever with this user.
The password to use when connecting to the database server.
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.
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.