...
- PI REST Web Service: The PI REST Service can be accessed using the REST protocol. See also: https://fewsdocs.deltares.nl/webservices/rest-api/v1
- WMS-T Web Mapping Service: The Web Mapping Service with time support can be accessed using the OGC-WMS protocol. See also: https://fewsdocs.deltares.nl/webservices/rest-api/v1
- FEWS Schematic Status Display Web Services: The SSD Web service can by access by the REST protocol. See also: https://fewsdocs.deltares.nl/webservices/ssd
- PI SOAP Web Service: The PI SOAP Service can be accessed by the SOAP protocol. The Delft-FEWS PI SOAP Web Services has been removed in Delft-FEWS 2022.01. See: Delft-FEWS End of Life Modules and Displays#FEWSEndofLifeModulesandDisplays-FEWSWebServicesAPIsthatwillberemoved
- WaterML Web Service: The WaterML2 Web Service can be accessed by the WaterML protocol.
- Digitale Delta Web Service: The Digitale Delta Web Service can be accessed by the REST protocol.Umaquo
- Operating Request Web Service: The Umaquo Operating Request Web Service can be accessed by the REST protocol. See also: https://fewsdocs.deltares.nl/webservices/operatingrequest/
- Umaquo Web Service: The Umaquo Web Service can be accessed by the SOAP protocol. Was removed in the 2022. SOAP protocol. Was removed in the 2022.02 release.
The different service are available at the following endpoints:
- FEWS PI Rest Web Services: /rest/fewspiservice/*
- FEWS WMS-T Web Mapping Services: /wms
- FEWS Schematic Status Display Web Services: /ssd
- FEWS PI SOAP Web Services: /fewspiservicefewspiservice Was removed in the 2022.01 release.
- FEWS WaterML Web Services: /waterml
- FEWS Digitale Delta Web Services: /rest/digitaledelta/*
- FEWS Operating Request Web Services: /rest/operatingrequest/*
- FEWS Umaquo Web Services: /umaquo Was removed in the 2022.02 release.
...
Since FEWS 2022.02 the Delft-FEWS Web Services can be started from a standalone or operator client with the F12 menu option: "start embedded tomcat web services" or with a configuration option in the explorer.xml which will try to start the FewsWebServices on port 8080 which makes it available on your local machine at: http://localhost:8080/FewsWebServices/. It is also possible with a configuration option in the explorer.xml from the SystemConfigFiles folder. See: 01 FEWS Explorer#01FEWSExplorer-fewsWebServicesPortRange https://publicwiki.deltares.nl/display/FEWSDOC/01+FEpiServicePortRangeWS+Explorer#id-01FEWSExplorer-piServicePortRange.
Installation
Tomcat Installation
The FEWS Web Services are supported on the Tomcat 7 and Tomcat 8 and 9 application server. See: application server, check Tomcat requirements for the required version (depends on the Delft-FEWS version you use). You can download Tomcat here: https://tomcat.apache.org/download-70.cgi, https://tomcat.apache.org/download-80.cgi and https://tomcat.apache.org/download-90.cgi.
The requirements of the 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.
...
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.
Warning |
---|
Since 2021.02 the test page is disabled by default. To enable the test page, please see: FEWS Web Services Configuration FewsPiService.properties (- deprecated since 2022.02). |
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.
Web Services log files
After upgrading the FewsWebServices.war, old log files have to be deleted. The log files are stored in: ${catalina.home}/fews/Region_Home folder. All *.txt files should be deleted.
...
user environment variable | description |
---|---|
FEWS_WS_CLIENT_CONFIG_FILE_NAME | Name of the client config file as available in the RootConfigFiles folder of the uploaded Delft-FEWS configuration. ClientType has to be: Web Services |
FEWS_WS_DATABASE_URL | Database url, e.g. jdbc:vjdbc:servlet:https://<host>:<port>/FewsDatabaseHttpsProxy jdbc:postgresql://<host>:<port>/<databaseName> jdbc:oracle:thin:@<host>:<port>:<sid> or jdbc:sqlserver://<host>:<port>;DatabaseName=<databaseName> |
FEWS_WS_DATABASE_USER | Database user name to connect with. The name should not be specified when using AD (Active Directory). |
FEWS_WS_DATABASE_ENCRYPTED_PASSWORD | Encrypted Database password. The password should be specified when using AD (Active Directory). |
FEWS_WS_HOME | Optional. Folder where caches are stored. If not configured, it will be set to the "${catalina.home}/fews/Region_Home". |
FEWS_WS_WEB_SERVICES_CONFIG_FILE_NAME | Optional. Name of the Web Services configuration file from the Delft-FEWS Configuration folder: PiServiceConfigFiles. Default is: WebServices.xml. Since 2022.02. See also: FEWS WebServices Configuration File (- since 2022.02) |
FEWS_WS_CLIENTCONFIGFILEID | Optional. Name of the client config file from the Delft-FEWS Configuration folder: PiClientConfigFiles. Default is: FewsPiService.properties. Deprecated since 2022.02. See also: FEWS Web Services Configuration FewsPiService.properties (- deprecated since 2022.02) |
An example of configured environment variables.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <clientConfiguration xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/clientConfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews"> <title>My WebServices Client</title> <clientType>Web Services</clientType> <otherRootConfigFiles> <name>ws_global.properties</name> </otherRootConfigFiles> </clientConfiguration> |
Since 2023.02 the autoExportModuleDataSet in the clientConfig is recognized on startup of the webservice. A restart of tomcat is required to update the module datasets if changed
Migrating from 2020.01 and before
...
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <clientConfiguration xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/clientConfig.xsd"> <connection id="Database" name="Database"> <databaseServer> <url>FEWS_DATABASE_URL</url> <user>dummy_username</user> <encryptedPassword>dummy_password_encrypted</encryptedPassword> </databaseServer> </connection> </clientConfiguration> |
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 to the Tomcat/bin folder. This can be found here:
- 2020.02 and earlier: from the Master Controller build/lib folder installation
- 2021.01 and later: Delft-FEWS bin folder
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <clientConfiguration xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/clientConfig.xsd"> <connection id="Database" name="Database"> <databaseServer> <url>FEWS_DATABASE_URL;integratedSecurity=true</url> </databaseServer> </connection> </clientConfiguration> |
FewsPiService.properties
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:
%REGION_HOME%/Config/PiClientConfigFiles/FewsPiService.properties
For more information about the possible properties, see FEWS Web Services Configuration FewsPiService.properties (- deprecated since 2022.02).
Global Properties
In case global properties are needed by the FEWS Web Services, a global.properties file can be put in the Region_Home directory as well. If the same global.properties 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.
...
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <clientConfiguration xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/clientConfig.xsd"> <clientType>Stand alone</clientType> </clientConfiguration> |
Warning |
---|
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
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/RegionConfigFiles/Filters.xml"
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <filters version="1.1" xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/filters.xsd"> <defaultFilterId>some_defined_filter</defaultFilterId> ... |
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/FewsPiService.properties". 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 FewsPiService.properties overrules the default filter in the Filters.xml.
Code Block |
---|
FILTER_ID=some_defined_filter |
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 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.war file it is recommended to delete the FewsWebService directory in the webapps directory and restart tomcat after deployment.
Advanced Installation and Configuration (Since 2022.02)
Since 2022.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.
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${catalina.home}/fews/FewsWebServices.war">
<Parameter name="ENV_PREFIX" value="FEWS_WS_01_" override="false"/>
</Context>
|
Using this configuration the web service will now expect the following ENV variables to be available:
Code Block | ||||
---|---|---|---|---|
| ||||
FEWS_WS_01_DATABASE_URL=jdbc:postgresql://dummy_hostname:6001/dummy_databasename
FEWS_WS_01_DATABASE_USER=dummy_username
FEWS_WS_01_DATABASE_ENCRYPTED_PASSWORD=dummy_password_encrypted
FEWS_WS_01_CLIENT_CONFIG_FILE_NAME=ws_clientConfig.xml
FEWS_WS_01_HOME=d:\fews-ws\region-home-01
FEWS_WS_01_WEB_SERVICES_CONFIG_FILE_NAME=FewsWebServices01.xml |
For a StandAlone system it is also possible to have multiple web services. In this case, only the following ENV variables should be specified:
Code Block | ||||
---|---|---|---|---|
| ||||
FEWS_WS_01_HOME=d:\fews-ws\region-home-01
FEWS_WS_01_WEB_SERVICES_CONFIG_FILE_NAME=FewsWebServices01.xml |
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 (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.
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <Context docBase="${catalina.home}/fews/FewsWebServices.war"> <Parameter name="ENV_PREFIX" value="FEWS_WS_01_" override="false"/> </Context> |
Using this configuration the web service will now expect the following ENV variables to be available:
Code Block | ||||
---|---|---|---|---|
| ||||
FEWS_WS_01_DATABASE_URL=jdbc:postgresql://dummy_hostname:6001/dummy_databasename FEWS_WS_01_DATABASE_USER=dummy_username FEWS_WS_01_DATABASE_ENCRYPTED_PASSWORD=dummy_password_encrypted FEWS_WS_01_CLIENT_CONFIG_FILE_NAME=ws_clientConfig.xml FEWS_WS_01_HOME=d:\fews-ws\region-home-01 FEWS_WS_01_CLIENTCONFIGFILEID=FewsPiService01.properties |
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 FewsPiService.properties 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.
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <Context docBase="${catalina.home}/fews/FewsWebServices.war"> <Parameter name="clientConfigFileId" value="FewsPiService01.properties" override="false"/> <Parameter name="regionHome" value="${catalina.home}/fews/Region_Home01" override="false"/> </Context> |
The FewsPiService01.properties is expected to be in:
Code Block |
---|
%REGION_HOME%/Config/PiClientConfigFiles/FewsPiService01.properties |
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.
Security
Since 2017.02 it is also possible to run the Delft-FEWS Web Services in readOnly mode. The FewsPiService.properties can be configured with the property READONLY_MODE=true to only allow read access.
Warning |
---|
Since 2018.02 readOnly mode is enabled by default. |
Since 2021.02 the testing page is disabled by default. To enable the testing page, the FewsPiService.properties can be configured with the property TEST_PAGE_ENABLED=true to allow the usage of the test page. It is also possible to pass a java property to the JVM to enable the testpage: -DTEST_PAGE_ENABLED=true.
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.
Testing
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). You can find more on how to configure the different services on 18 FEWS data exchange interfaces.
See. For general instructions on installing tomcat, see also: Delft-FEWS Installation - Install Apache Tomcat.
Warning |
---|
Since 2021.02 the test page is disabled by default. To enable the test page, please see the TEST_PAGE_ENABLED property: FEWS Web Services Configuration FewsPiService.properties (- deprecated since 2022.02). |
Migrating from before 2017.02
...
From the ${catalina.home}/conf/Catalina/localhost old xml configurations with references to the old services should be removed as well.