diff flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java @ 1425:bc06a671ef60

Removed the URL parameter from service calls. The service implementations read the URL from the web.xml config file now. flys-client/trunk@3367 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 08 Dec 2011 09:12:27 +0000
parents ab8eb2f544f2
children 2867a0192aed
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java	Thu Dec 08 08:06:11 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java	Thu Dec 08 09:12:27 2011 +0000
@@ -48,9 +48,11 @@
     public static final String ERROR_NO_RIVERS_FOUND = "error_no_rivers_found";
 
 
-    public River[] list(String serverUrl, String locale)
+    public River[] list(String locale)
     throws ServerException
     {
+        String url = getServletContext().getInitParameter("server-url");
+
         Document doc      = XMLUtils.newDocument();
 
         XMLUtils.ElementCreator ec = new XMLUtils.ElementCreator(
@@ -60,10 +62,10 @@
 
         doc.appendChild(ec.create("action"));
 
-        HttpClient client = new HttpClientImpl(serverUrl, locale);
+        HttpClient client = new HttpClientImpl(url, locale);
 
         try {
-            Document res = client.callService(serverUrl, "rivers", doc);
+            Document res = client.callService(url, "rivers", doc);
 
             NodeList rivers = (NodeList) XMLUtils.xpath(
                 res,

http://dive4elements.wald.intevation.org