[PATCH 2 of 3] Put WMS services config in line with other config files
Wald Commits
scm-commit at wald.intevation.org
Wed Oct 12 17:07:47 CEST 2022
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1665582124 -7200
# Wed Oct 12 15:42:04 2022 +0200
# Branch 3.2.x
# Node ID d536a2184ddf4c291d2f535b3797fbe706b5215c
# Parent a14836131b23c38ef1997e485a9fb0c96da307d0
Put WMS services config in line with other config files
diff -r a14836131b23 -r d536a2184ddf gwt-client/config/wms-services.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gwt-client/config/wms-services.xml Wed Oct 12 15:42:04 2022 +0200
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wms-services>
+ <wms name="OSM Hintergrundkarte" url="https://kartenwerkstatt.intevation.de/bfg/service?"/>
+ <wms name="Pegelonline" url="https://www.pegelonline.wsv.de/webservices/gis/wms/aktuell?"/>
+</wms-services>
diff -r a14836131b23 -r d536a2184ddf gwt-client/src/main/java/org/dive4elements/river/client/server/MapUrlServiceImpl.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/MapUrlServiceImpl.java Wed Oct 12 15:24:10 2022 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/MapUrlServiceImpl.java Wed Oct 12 15:42:04 2022 +0200
@@ -8,7 +8,7 @@
package org.dive4elements.river.client.server;
-import java.io.InputStream;
+import java.io.File;
import java.util.Map;
import java.util.HashMap;
@@ -43,10 +43,10 @@
log.info("MapUrlServiceImpl.getUrls");
Map<String, String> urls = new HashMap<String, String>();
- InputStream in = getServletContext().getResourceAsStream(
- "/WEB-INF/wms-services.xml");
+ File file = new File(
+ getServletContext().getInitParameter("wms-services-file"));
- Document doc = XMLUtils.parseDocument(in);
+ Document doc = XMLUtils.parseDocument(file);
NodeList list = doc.getElementsByTagName("wms");
for (int i = 0; i < list.getLength(); i++) {
diff -r a14836131b23 -r d536a2184ddf gwt-client/src/main/webapp/WEB-INF/web.xml
--- a/gwt-client/src/main/webapp/WEB-INF/web.xml Wed Oct 12 15:24:10 2022 +0200
+++ b/gwt-client/src/main/webapp/WEB-INF/web.xml Wed Oct 12 15:42:04 2022 +0200
@@ -64,6 +64,11 @@
<param-value>/opt/d4e/river/gwt-client/config/features.xml</param-value>
</context-param>
+ <context-param>
+ <param-name>wms-services-file</param-name>
+ <param-value>/opt/d4e/river/gwt-client/config/wms-services.xml</param-value>
+ </context-param>
+
<listener>
<listener-class>org.dive4elements.river.client.server.BaseServletContextListener</listener-class>
</listener>
diff -r a14836131b23 -r d536a2184ddf gwt-client/src/main/webapp/WEB-INF/wms-services.xml
--- a/gwt-client/src/main/webapp/WEB-INF/wms-services.xml Wed Oct 12 15:24:10 2022 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<wms-services>
- <wms name="OSM Hintergrundkarte" url="https://kartenwerkstatt.intevation.de/bfg/service?"/>
- <wms name="Pegelonline" url="https://www.pegelonline.wsv.de/webservices/gis/wms/aktuell?"/>
-</wms-services>
More information about the Dive4Elements-commits
mailing list