Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/CreateCollectionServiceImpl.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 | 6bb6d43eeb2d |
comparison
equal
deleted
inserted
replaced
1424:8974e220b193 | 1425:bc06a671ef60 |
---|---|
47 * a new collection.*/ | 47 * a new collection.*/ |
48 public static final String ERROR_CREATE_COLLECTION = | 48 public static final String ERROR_CREATE_COLLECTION = |
49 "error_create_collection"; | 49 "error_create_collection"; |
50 | 50 |
51 | 51 |
52 public Collection create(String serverUrl, String locale, String ownerId) | 52 public Collection create(String locale, String ownerId) |
53 throws ServerException | 53 throws ServerException |
54 { | 54 { |
55 logger.info("Start creating a new collection."); | 55 logger.info("Start creating a new collection."); |
56 | 56 |
57 String url = getServletContext().getInitParameter("server-url"); | |
58 | |
57 Document create = | 59 Document create = |
58 ClientProtocolUtils.newCreateCollectionDocument(null); | 60 ClientProtocolUtils.newCreateCollectionDocument(null); |
59 HttpClient client = new HttpClientImpl(serverUrl, locale); | 61 HttpClient client = new HttpClientImpl(url, locale); |
60 | 62 |
61 try { | 63 try { |
62 Document doc = (Document) client.createCollection( | 64 Document doc = (Document) client.createCollection( |
63 create, ownerId, new DocumentResponseHandler()); | 65 create, ownerId, new DocumentResponseHandler()); |
64 | 66 |