Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/ExportServiceImpl.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 | 17c66d38f095 |
comparison
equal
deleted
inserted
replaced
1424:8974e220b193 | 1425:bc06a671ef60 |
---|---|
35 logger.info("ExportServiceImpl.doGet"); | 35 logger.info("ExportServiceImpl.doGet"); |
36 | 36 |
37 try { | 37 try { |
38 OutputStream out = resp.getOutputStream(); | 38 OutputStream out = resp.getOutputStream(); |
39 | 39 |
40 String serverUrl = req.getParameter("server"); | 40 String url = getServletContext().getInitParameter("server-url"); |
41 | |
41 String uuid = req.getParameter("uuid"); | 42 String uuid = req.getParameter("uuid"); |
42 String mode = req.getParameter("mode"); | 43 String mode = req.getParameter("mode"); |
43 String type = req.getParameter("type"); | 44 String type = req.getParameter("type"); |
44 String locale = req.getParameter("locale"); | 45 String locale = req.getParameter("locale"); |
45 String fn = mode + "." + type; | 46 String fn = mode + "." + type; |
48 | 49 |
49 logger.debug("Request " + type + " export."); | 50 logger.debug("Request " + type + " export."); |
50 Document request = ClientProtocolUtils.newOutCollectionDocument( | 51 Document request = ClientProtocolUtils.newOutCollectionDocument( |
51 uuid, mode, type); | 52 uuid, mode, type); |
52 | 53 |
53 HttpClient client = new HttpClientImpl(serverUrl, locale); | 54 HttpClient client = new HttpClientImpl(url, locale); |
54 client.collectionOut(request, uuid, mode, out); | 55 client.collectionOut(request, uuid, mode, out); |
55 | 56 |
56 out.close(); | 57 out.close(); |
57 out.flush(); | 58 out.flush(); |
58 } | 59 } |