Introduction

Since 2022.02 a WebServices xml configuration file is supported (and replaces the deprecated FewsPiServices.properties file). Please note that the WebServices xml file has to be in the PiServiceConfigFiles folder. (The FewsPiServices.properties file used to be in the PiClientConfigFiles folder).

Configuration

The default file name is WebServices.xml and  should be placed in the PiServiceConfigFiles folder of the Delft-FEWS Configuration. In a live system, the file has to be uploaded using the config manager.

The XML file should comply to the following schema: https://fewsdocs.deltares.nl/schemas/version1.0/webServices.xsd

The following is an example of a web services configuration file in the Config folder: PiServiceConfigFiles/WebServices.xml.

WebServices.xml
<?xml version="1.0" encoding="utf-8"?>
<webServices xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/webServices.xsd">
	<general>
		<filters>
			<filterId>myFilterId</filterId>
		</filters>
		<testPageEnabled>true</testPageEnabled>
 	</general>
</webServices>

Multiple WebServices xml configurations

 It is also possible to use a different file than the default WebServices.xml. Additional files can be added to the PiServiceConfigFiles folder. To use another config file in the Delft-FEWS Web Services, an environment variable needs to be specified with the file to use. See also FEWS Web Services#AdvancedInstallationandConfiguration(Since2022.02)

FEWS_WS_WEB_SERVICES_CONFIG_FILE_NAME=MyCustomWebServices.xml

Web Operator Client

In the WebServices.xml file a specific webOperatorClient configuration file can be specified since the 2023.01 version. The name has to start with WebOperatorClient. In the following example a reference to the WebOperatorClientMyFile config is included. It is required to have a WebOperatorClientMyfile.xml file in the SystemConfigFiles folder.

<?xml version="1.0" encoding="utf-8"?>
<webServices xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			 xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/webServices.xsd">
	<general>
        <filters>
            <filterId>webservice</filterId>
        </filters>
        <readonlyMode>false</readonlyMode>
		<testPageEnabled>true</testPageEnabled>
	</general>
	<webOperatorClientConfiguration>
		<configFile>WebOperatorClientMyFile</configFile>
	</webOperatorClientConfiguration>
</webServices>

Operating Request Service

In the WebServices.xml file a specific Operating Request Service Configuration section can be specified since the 2023.02 version. The name of the section has to start with operatingRequestService. The Filters needs to refer to external forecast timeseries where the issue date time of the service corresponds to the external forecast time of the external forecast series.

The filter may contain multiple locations, consisting of parents (the main objects like pump stations) and child locations (the individual components within the object, like pumps). The configuration of the operatingRequestService specifies the individual locations (i.e. objects) that can be called in the API. For each location, a version needs to be specified such that the scada system can check whether its data interpretation is still consistent with Delft-FEWS.

The following example defines the service for two objects.

<?xml version="1.0" encoding="utf-8"?>
<webServices xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			 xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/webServices.xsd">
    <general>
		<filters>
			<filterId>myOperatingRequestFilter</filterId>
		</filters>
		<exportIdmapId>IdExportOperatingRequest</exportIdmapId>
		<importIdmapId>IdExportOperatingRequestIJS_ABT</importIdmapId>
		<readonlyMode>false</readonlyMode>
		<testPageEnabled>true</testPageEnabled>
	</general>
	<operatingRequestService>
		<configuration>
			<locationId>pumpstation1</locationId>
			<version>1</version>
		</configuration>
		<configuration>
			<locationId>pumpstation2</locationId>
			<version>2</version>
		</configuration>
	</operatingRequestService>
</webServices>
  • No labels