Add content type check for GetMapResponse
-----------------------------------------

                 Key: GEOT-3362
                 URL: http://jira.codehaus.org/browse/GEOT-3362
             Project: GeoTools
          Issue Type: Bug
          Components: ext wms
    Affects Versions: 2.7-M5
            Reporter: Ivan Grcic


If GetMapResponse returned from wms server is not readable by ImageIO.read it 
returns null, and later on ambiguous error is thrown :
org.geoserver.platform.ServiceException: Error rendering coverage on the fast 
path 
(attached full stack)

This is can be the case if server returns text/xml document with simple errors, 
such as:
<ServiceException code="InvalidSRS(CRS)">Parameter 'srs(crs)' can not be 
empty.</ServiceException>

Inside WMSCoverageReader.getMap method we should intercept this, by checking if 
content type is readable or/and image is not null, and throw more informative 
error.
 
{quote}
            GetMapResponse response = wms.issueRequest(mapRequest);
            is = response.getInputStream();
            BufferedImage image = ImageIO.read(is);
            LOGGER.fine("GetMap completed");
            return gcf.create(layers.get(0).getTitle(), image, gridEnvelope);
{quote}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to