...
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 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.
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://localhost:6001/fewsdb00 FEWS_WS_01_DATABASE_USER=fews00 FEWS_WS_01_DATABASE_ENCRYPTED_PASSWORD=myencryptedpassword 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. |
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 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.
Info |
---|
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
...