...
If Tomcat is succesfully 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.
Direct database access
clientConfig.xml
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
...
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>FEWS_DATABASE_USER</user> <encryptedPassword>DATABASE_ENCRYPTED_PASSWORD</encryptedPassword> </databaseServer> </connection> </clientConfiguration> |
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 as 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. |
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: "${catalina.home}/fews/Region_Home/Config/RegionConfig/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>All</defaultFilterId> ... |
Alternatively a property file can be used to configure the default filter (and other properties as well). 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 "All" has been configured. A filter configured in hte the FewsPiService.properties overrules the default filter in the Filters.xml.
Code Block |
---|
FILTER_ID=All |
N.B.: In versions before FEWS 2017.02 it was possible to override the FewsPiService.properties with another name or location. This is no longer supported. Only one property file can be used for all services and the name is fixed to FewsPiService.properties.
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.
Security
Since 2017.02 it is also possible to run the FEWS Web Services in readOnly mode. The FewsPiService.properties can be configured with the property READONLY_MODE=true to only allow read access.
The 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. |
Since 2017.02 it is also possible to run the FEWS Web Services in readOnly mode. The FewsPiService.properties can be configured with the property READONLY_MODE=true to only allow read access.
The FEWS Web Services can be protected using the capabilities of the Tomcat Application Server. See FEWS Web Services Tomcat Security for more information. |
Migrating from before 2017.02
In case an existing FEWS web service has to be migrated to the 2017.02 or later version, the following changes should be taken into account.
...