Page tree
Skip to end of metadata
Go to start of metadata


Since FEWS 2017.02 all FEWS Web Services have been unified into one installation package (FewsWebServices.war). The following WebServices are available with this installation using HTTP(s):


Tomcat Installation

The FEWS Web Services are supported on the Tomcat 7 and Tomcat 8 and 9 application server. See:  and requirements of the Java version to be used for Tomcat is the same as for the FEWS version that is being used. It is strongly advised to use same Java JRE for tomcat as is used for a FEWS OC when installing tomcat. For 2018.02 the java version should be java 11.

This installation guide assumes a newly installed Tomcat 7, 8 or 9 application server. For migrating existing installations from before FEWS 2017.02, see the paragraph on migrating.

The root of the tomcat installation is referred to as "${catalina.home}" and will be used from here. The root of a tomcat installation can be recognized by the webapps and conf directories.

It is recommended to give a tomcat a heapsize of at least 1GByte, but preferably more. This can be done using the -Xmx1024m java argument. Since 2019.02 the FEWS Web Services won't start if there is not enough memory available.  For general instructions on installing tomcat, see also: Delft-FEWS Installation - Install Apache Tomcat.

For general Tomcat installation instructions, please see: Delft-FEWS Installation - Install Apache Tomcat

FewsWebServices.war installation

The FEWS Web Services are packaged in a file called the FewsWebServices.war. Before installation, make sure the tomcat server has been shutdown. Inspect the ${catalina.home}/webapps folder and inspect if there is a FewsWebServices folder. If this folder exists, delete the ${catalina.home}/webapps/FewsWebServices folder. The FewsWebServices.war file has to be copied to the ${catalina.home}/webapps folder.

Delft-FEWS Web Services Installation

If Tomcat is successfully installed and the FewsWebServices.war deployed, the FEWS configuration installation can be done. FEWS itself (i.e. the bin\ folder) is packaged inside the FewsWebServices.war. Please see below for notes regarding a Stand Alone Delft-FEWS application used in combination with the FEWS Web Services.

Direct database access using ENV variables (since 2020.02)

Since 2020.02 it is possible to install the Delft-FEWS Web Services by only providing Environment variables. This is the recommended way of configuration.

The environment variables can be set with SETX /M for windows or in the systemd configuration file for Linux. Run SETX /M makes variables available for all (service) user accounts.

user environment variabledescription


Name of the client config file as available in the RootConfigFiles folder of the uploaded Delft-FEWS configuration. ClientType has to be: Web Services


Database url, e.g.

jdbc:oracle:thin:@<host>:<port>:<sid> or 
FEWS_WS_DATABASE_USERDatabase user name to connect with. The name should not be specified when using AD (Active Directory).
FEWS_WS_DATABASE_ENCRYPTED_PASSWORDEncrypted Database password. The password should be specified when using AD (Active Directory).
FEWS_WS_HOMEOptional. Folder where caches are stored. If not configured, it will be set to the "${catalina.home}/fews/Region_Home".
FEWS_WS_CLIENTCONFIGFILEIDOptional. Name of the client config file from the Delft-FEWS Configuration folder: PiClientConfigFiles. Default is:

An example of configured environment variables.

Example: ENV variables

The clientConfiguration of type "Web Services".

Take note in the following example that the clientType is set to "Web Services". Also a file is required. The configurated property file will be used by the Delft_FEWS configuration.

Example: ws_clientConfig.xml with Web Services client type
<?xml version="1.0" encoding="UTF-8"?>
<clientConfiguration xsi:schemaLocation="" xmlns:xsi="" xmlns="">
<title>My WebServices Client</title>
<clientType>Web Services</clientType>

Migrating from 2020.01 and before

Before 2020.02 the FewsWebServices required a local clientConfig.xml file and in the ${catalina.home}/fews/Region_Home folder. N.B.: this folder still needs to exist if no FEWS_WS_HOME env variable is used.

When migrating to 2020.02 all files in this folder have to be deleted. Please follow the configuration steps in DirectdatabaseaccessusingENVvariables(since2020.02) to complete the migration. 

Direct database access using clientConfig.xml (before 2020.02)


Direct database access has to be configured in the "${catalina.home}/fews/Region_Home" directory. Make sure the exact folder names are use (case sensitive on linux): /fews/Region_Home

In this folder a clientConfig.xml is required to configure a direct database access client. In the following code snippet an example of the configuration of a Direct Database Access client can be seen. The tomcat process should have write permissions to the Region_Home directory. The clientConfig.xml file should be readable by Tomcat.


<?xml version="1.0" encoding="UTF-8"?>
<clientConfiguration xmlns="" xmlns:xsi=""
    <connection id="Database" name="Database">

Cache configuration

Since 2020.02 it is possible to use the localCacheSizeMB in the clientConfig.xml to tune the amount of in memory caching the PI service is allowed to do. This can be quite useful for performance tuning when using seamless integration with the archive.

This setting was already available to the Operator Client and Forecasting Shell Servers. If not configured a default cache size of 500MByte will be used.

See also: 08 Root Configuration Files for Operator Client and Forecasting Shell Servers

Configure Database connection over Active Directory

When using MS Sql Server it is possible to connect to the database through Active Directory. This can be configured by updating the client configuration file (see example below). 

  • remove user
  • remove encryptedPassword
  • extend URL by adding integratedSecurity=true

Furthermore it is necessary to copy sqljdbc_auth.dll from the Master Controller build/lib folder installation to the Tomcat/bin folder.

<?xml version="1.0" encoding="UTF-8"?>
<clientConfiguration xmlns="" xmlns:xsi=""
    <connection id="Database" name="Database">

The FEWS Web Services have a custom property file that can be used to make service specific configurations available. This is a property file that is located in the FEWS configuration in the directory:


For more information about the possible properties, see FEWS Web Services configuration

Global Properties

In case global properties are needed by the FEWS Web Services, a file can be put in the Region_Home directory as well. If the same is available in the RootConfigFile in the FEWS configuration, the properties will be overwritten by the one in the FEWS database

Index Files

Since 2018.02 the FEWS Web Services will not startup before an index file is available in the Database. Index files are created automatically by Forecasting Shells. This means that the FEWS Web Services will only start if a running Forecasting Shell is available on the live system.

Stand alone

When using a stand alone configuration with an existing local data store, note that only the Derby database datastore is supported for the Fews Web Services. Existing firebird datastores can be converted into a derby datastore using FEWS F12/Database/Replicate Central Database option. In the context of this Web Service, you can use the replica directly as (and where) it is created with this method. Update the localDatastoreFormat in your global properties file if needed.

If installation fails, please check the webservice.log and catalina.log files in the ${catalina.home}/logs directory.

Since 2018.02 there is no longer a webservices.log file. The FEWS Web Services log files are written to the /fews/Region_Home folder with the name log.1.txt etc.. use the environment variable LOG4J_DEBUG=true to enable debug logging.

FEWS has to be installed in the root folder of tomcat in the directory "${catalina.home}/fews/Region_Home". Make sure the exact folder names are use (case sensitive on linux): /fews/Region_Home

In this folder a clientConfig.xml is required to configure the stand alone client. In the following code snippet the configuration of a Stand alone client can be seen. The tomcat process should have write permissions to the Region_Home directory. The clientConfig.xml file should be readable by Tomcat.


<?xml version="1.0" encoding="UTF-8"?>
<clientConfiguration xmlns="" xmlns:xsi="" xsi:schemaLocation="">
	<clientType>Stand alone</clientType>

Only direct database access should be used for operational use of the FEWS Web Services. A standalone configuration can be used, but only has limited functionality. For example only the Derby local data store is supported and workflows depending on DLL's (or .so files on Linux) are NOT supported.

Delft-FEWS Configuration requirements

The only requirement for running the FewsWebServices is that a default filter is configured in FEWS. This can be done in two different ways:

Configure a default filter in the Filters.xml of the FEWS configuration with the name of the filter that should be used for all requested timeSeries. For a standalone application this applies to the following file: "${catalina.home}/fews/Region_Home/Config/RegionConfig/Filters.xml"


<?xml version="1.0" encoding="UTF-8"?>
<filters version="1.1" xmlns="" xmlns:xsi="" xsi:schemaLocation="">

Alternatively a property file can be used to configure the default filter (and other properties as well). For a standalone application, the property file should be located at: "${catalina.home}/fews/Region_Home/Config/PiClientConfigFiles/". In the following code snippet the default filter to be used by the FEWS Web Services is configured using the property key "FILTER_ID" where the filter has been configured. A filter configured in the overrules the default filter in the Filters.xml.



 If the previous configurations have been applied, the FewsWebServices.war can be installed using the standard deployment options of Tomcat. See the tomcat deployment documentation for more information. When installing a new version of the FewsWebServices.war file it is recommended to delete the FewsWebService directory in the webapps directory and restart tomcat after deployment.

Advanced Installation and Configuration (Since 2020.02)

Since 2020.02 multiple FewsWebServices are supported in the same tomcat by specifying the ENV_PREFIX servlet context variable. The prefix is used to resolve the FewsWebServices specific environment variables. If not set, the ENV_PREFIX defaults to FEWS_WS_ .

For example if multiple FewsWebServices are deployed in the same tomcat, multiple Context.xml configurations can be configured with different prefixes.

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${catalina.home}/fews/FewsWebServices.war">
    <Parameter name="ENV_PREFIX" value="FEWS_WS_01_" override="false"/>

Using this configuration the web service will now expect the following ENV variables to be available:

Example: ENV variables

The FewsWebServices will be available at http://localhost:8080/FewsWebServices01/For multiple configurations more context xml files can be created with custom ENV variables.

Advanced Installation and Configuration (Before 2020.02)

In some cases it may be required to support different on the same database, for example to support different default filters. In this case and advanced installation of the FEWS Web Services is required that is similar to installations before 2017.02. 

 The FewsWebServices.war file should be put in the ${catalina.home}/fews folder, instead of the ${catalina.home}/webapps. 

In the ${catalina.home}/conf/Catalina/localhost folder a context.xml should be created where a specific client config file id can be configured. In this xml file a reference to the FewsWebServices.war file should be made and a reference to the property file to be used.

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${catalina.home}/fews/FewsWebServices.war">
    <Parameter name="clientConfigFileId" value="" override="false"/>
    <Parameter name="regionHome" value="${catalina.home}/fews/Region_Home01" override="false"/>

The is expected to be in:


Using this configuration the web service will now be available at http://localhost:8080/FewsWebServices01/For multiple configurations more context xml files can be created.



Since 2017.02 it is also possible to run the Delft-FEWS Web Services in readOnly mode. The can be configured with the property READONLY_MODE=true to only allow read access. 

Since 2018.02 readOnly mode is enabled by default.

The Delft-FEWS Web Services can be protected using the capabilities of the Tomcat Application Server. See FEWS Web Services Tomcat Security for more information.


The FEWS Web Services come with a testing page that can be accessed at: http://localhost:8080/FewsWebServices/. This leads to an overview page with links to test pages for the different services (SOAP, REST, WaterML, Digitale Delta and UmAquo). You can find more on how to configure the different services on 18 FEWS data exchange interfaces.

See Tomcat Installation as Windows Service usage for running the Web Services as a Windows service.

The default tomcat installation runs at port 8080. Change the port value in case your tomcat installation runs on another port.

Migrating from before 2017.02

In case an existing Delft-FEWS web service has to be migrated to the 2017.02 or later version, the following changes should be taken into account.

Installation directory

The FewsWebServices.war file is installed in the ${catalina.home}/webapps folder instead of the ${catalina.home}/fews folder.

Derby Local datastore

Running the FEWS Web Services in standalone mode is only supported for the Derby local datastore with limited functionality. Please see the previous Installation section if an existing non-Derby local datastore needs to be converted to Derby using the Database replication functionality of FEWS. For full functionality configure a clientConfig.xml file with a direct database connection.

Default PI Version

Before 2017.02 the FEWS PI Services always returned its response in the PI 1.9 version format. Since 2017.02 if no version is specified, the latest pi version format will be used. If it is required to get a specific version of the pi format, the version can be specified in the service call.

URL changes

The example URLs are based on a default tomcat installation with port 8080. Please adjust in case the defaults have been changed where appropriate.

PI SOAP Web Service

The change that has the largest impact on the URLs of the Web services is the changed context path (the URL part after the servername + port). Before 2017.02 every FEWS Web service has its own context path. Since 2017.02 all webservices have the same context path, which is FewsWebServices by default.

For example before 2017.02 the URL endpoint of the FEWS PI SOAP Web Service would be: http://localhost:8080/FewsPiServices/fewspiservice

Since 2017.02 it is: http://localhost:8080/FewsWebServices/fewspiservice

If it is required to keep the endpoints backwards compatible, the FewsWebServices.war can be renamed into FewsPiService.war.

PI REST Web Service

For the PI REST Web Service it is not possible to keep the endpoints backwards compatible since the "rest" path is now a required part of the endpoint.


Tomcat installation changes

N.B.: It is highly recommended to install a clean version of tomcat.


It is advisable to cleanup the ${catalina.home}/temp and ${catalina.home}/work folder. N.B. Don't delete the folders themselves, only their content! 

In case there is an old FewsPIService.war in the fews folder, please remove the old FewsPIService.war.

If there is a FewsPIService folder in the ${catalina.home}/webapps folder, please remove this folder.


Previously the FEWS Web services required a DAC.jar to be installed. Since 2017.02 this component is obsolete and should be removed from existing tomcat installations. See also the tomcat installation guide.

To uninstall the DAC.jar it should be removed from  ${catalina.home}/lib directory. Also the ${catalina.home}/conf/server.xml should be cleaned up. The reference to the DacLifecycleListener should be removed from the server.xml:

<Listener className="" />

Also a reference to the fews_dac resource should be removed:

<Resource name="fews_dac" auth="Container"

From the ${catalina.home}/conf/Catalina/localhost old xml configurations with references to the old services should be removed as well.

  • No labels