Mercurial > dive4elements > gnv-client
comparison gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java @ 676:707e142e7d44
Improved ExceptionHandling during WMS-Publishing.
gnv/trunk@807 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 19 Mar 2010 13:15:59 +0000 |
parents | 93b4dedc4e37 |
children | 2943f69e006f |
comparison
equal
deleted
inserted
replaced
675:0d23f7ba53dd | 676:707e142e7d44 |
---|---|
835 | 835 |
836 public Document publishWMS( | 836 public Document publishWMS( |
837 ArtifactObject factory, | 837 ArtifactObject factory, |
838 ArtifactObject artifact, | 838 ArtifactObject artifact, |
839 Collection<InputParameter> inputParameter | 839 Collection<InputParameter> inputParameter |
840 ) { | 840 ) throws ArtifactDatabaseClientException, ArtifactDatabaseInputException{ |
841 log.debug("Start wms publishing..."); | 841 log.debug("Start wms publishing..."); |
842 | 842 |
843 String target = "wms"; | 843 String target = "wms"; |
844 String requestURL = getArtifactUrl(factory, artifact) + "/" + target; | 844 String requestURL = getArtifactUrl(factory, artifact) + "/" + target; |
845 Document request = createOutRequestBody( | 845 Document request = createOutRequestBody( |
846 artifact, target, "", "text/xml", inputParameter); | 846 artifact, target, "", "text/xml", inputParameter); |
847 try { | 847 try { |
848 InputStream input = doPostRequest(requestURL, request); | 848 InputStream input = doPostRequest(requestURL, request); |
849 Document result = XMLUtils.readDocument(input); | 849 Document result = XMLUtils.readDocument(input); |
850 | 850 this.check4ExceptionReport(result); |
851 return result; | 851 return result; |
852 } | 852 } |
853 catch (IOException ioe) { | 853 catch (IOException ioe) { |
854 log.error(ioe, ioe); | 854 log.error(ioe, ioe); |
855 return null; | 855 throw new ArtifactDatabaseClientException(ioe); |
856 } | 856 } |
857 } | 857 } |
858 | 858 |
859 public Collection<ArtifactStatisticsSet> calculateStatistics( | 859 public Collection<ArtifactStatisticsSet> calculateStatistics( |
860 ArtifactObject artifactFactory, | 860 ArtifactObject artifactFactory, |