comparison flys-client/src/main/java/de/intevation/flys/client/server/AdvanceServiceImpl.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 f2039d030b5e
comparison
equal deleted inserted replaced
1424:8974e220b193 1425:bc06a671ef60
38 38
39 public static final String ERROR_ADVANCE_ARTIFACT = "error_advance_artifact"; 39 public static final String ERROR_ADVANCE_ARTIFACT = "error_advance_artifact";
40 40
41 41
42 public Artifact advance( 42 public Artifact advance(
43 String serverUrl,
44 String locale, 43 String locale,
45 Artifact artifact, 44 Artifact artifact,
46 String target) 45 String target)
47 throws ServerException 46 throws ServerException
48 { 47 {
49 logger.info("AdvanceServiceImpl.advance"); 48 logger.info("AdvanceServiceImpl.advance");
50 49
50 String url = getServletContext().getInitParameter("server-url");
51
51 Document advance = ClientProtocolUtils.newAdvanceDocument( 52 Document advance = ClientProtocolUtils.newAdvanceDocument(
52 artifact.getUuid(), 53 artifact.getUuid(),
53 artifact.getHash(), 54 artifact.getHash(),
54 target); 55 target);
55 56
56 HttpClient client = new HttpClientImpl(serverUrl, locale); 57 HttpClient client = new HttpClientImpl(url, locale);
57 58
58 try { 59 try {
59 Document description = (Document) client.advance( 60 Document description = (Document) client.advance(
60 new de.intevation.artifacts.httpclient.objects.Artifact( 61 new de.intevation.artifacts.httpclient.objects.Artifact(
61 artifact.getUuid(), 62 artifact.getUuid(),

http://dive4elements.wald.intevation.org