comparison flys-client/src/main/java/de/intevation/flys/client/server/CSVExportServiceImpl.java @ 258:5091675676d6

Fixed attributes/namespaces in the XML document that is used to fetch the CSV export of WINFO computations. flys-client/trunk@1871 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 10 May 2011 06:48:46 +0000
parents 5e1c1b7d6516
children 50a95db68e66
comparison
equal deleted inserted replaced
257:7017ed659ee6 258:5091675676d6
52 52
53 if (name.startsWith("output.")) { 53 if (name.startsWith("output.")) {
54 name = name.substring(name.indexOf(".") + 1); 54 name = name.substring(name.indexOf(".") + 1);
55 } 55 }
56 56
57 Element action = ec.create("art:action"); 57 Element action = ec.create("action");
58 action.setAttribute("art:type", "csv"); 58 ec.addAttr(action, "type", "csv", true);
59 action.setAttribute("art:name", name); 59 ec.addAttr(action, "name", name, true);
60 60
61 requestDoc.appendChild(action); 61 requestDoc.appendChild(action);
62 62
63 HttpClient client = new HttpClientImpl(url, locale); 63 HttpClient client = new HttpClientImpl(url, locale);
64 try { 64 try {
65 InputStream in = client.collectionOut(requestDoc, uuid, "export"); 65 InputStream in = client.collectionOut(requestDoc, uuid, "export");
66 Reader reader = new InputStreamReader (in, "UTF-8"); 66 Reader reader = new InputStreamReader (in, "UTF-8");
67 CSVReader csvReader = new CSVReader (reader); 67 CSVReader csvReader = new CSVReader (reader);
68 String[] line; 68
69 List l = csvReader.readAll (); 69 return csvReader.readAll ();
70 return l;
71 } 70 }
72 catch (IOException ce) { 71 catch (IOException ce) {
73 System.err.println(ce.getLocalizedMessage()); 72 System.err.println(ce.getLocalizedMessage());
74 } 73 }
75 74

http://dive4elements.wald.intevation.org