comparison flys-client/src/main/java/de/intevation/flys/client/server/ArtifactServiceImpl.java @ 229:924da6695800

Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient. flys-client/trunk@1681 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 14 Apr 2011 07:53:01 +0000
parents e02f50a3ad59
children 653ae84533e7
comparison
equal deleted inserted replaced
228:bbe32496dc84 229:924da6695800
28 /** The error message key that is thrown if an error occured while artifact 28 /** The error message key that is thrown if an error occured while artifact
29 * creation.*/ 29 * creation.*/
30 public static final String ERROR_CREATE_ARTIFACT = "error_create_artifact"; 30 public static final String ERROR_CREATE_ARTIFACT = "error_create_artifact";
31 31
32 32
33 public Artifact create(String serverUrl, String factory) 33 public Artifact create(String serverUrl, String locale, String factory)
34 throws ServerException 34 throws ServerException
35 { 35 {
36 System.out.println("ArtifactServiceImpl.create");
37
36 Document create = ClientProtocolUtils.newCreateDocument(factory); 38 Document create = ClientProtocolUtils.newCreateDocument(factory);
37 HttpClient client = new HttpClientImpl(serverUrl); 39 HttpClient client = new HttpClientImpl(serverUrl, locale);
38 40
39 try { 41 try {
40 return (Artifact) client.create(create, new FLYSArtifactCreator()); 42 return (Artifact) client.create(create, new FLYSArtifactCreator());
41 } 43 }
42 catch (ConnectionException ce) { 44 catch (ConnectionException ce) {

http://dive4elements.wald.intevation.org