WebMapServer fails to parse Capabilities for version 1.3.0
----------------------------------------------------------

                 Key: GEOT-3022
                 URL: http://jira.codehaus.org/browse/GEOT-3022
             Project: GeoTools
          Issue Type: Bug
          Components: ext wms
    Affects Versions: 2.6.3
         Environment: JVM: Java HotSpot(TM) Client VM (14.3-b01, mixed mode)
Java Home: C:\Program Files\Java\jdk1.6.0_17\
OS: Windows XP v5.1, SP3


            Reporter: Kenneth Gulbrandsøy
            Assignee: Richard Gould
            Priority: Blocker
         Attachments: WmsTest.java

During the construction of a new WebMapServer object with the capabilities URL 
http://opencache.statkart.no/gatekeeper/gk/gk.open?REQUEST=GetCapabilities, the 
following exception is raised: 

{color:red} java.lang.ClassCastException: java.net.URL cannot be cast to 
org.geotools.data.ows.OperationType {color}

The exception occurs during the execution of 
org.geotools.data.ows.AbstractOpenWebService.negotiateVersion(). Is seems like 
the method fails when it negotiates capabilities for WMS version 1.3.0 with the 
given host. 

The following JUnit test should reproduce this bug:

{code:title=WMSTest.java|borderStyle=solid}
/**
  * This test attempts to connect to a WMS-C host
  * @throws IOException 
  * @throws ServiceException 
  */
public void testNewWMS() throws ServiceException, IOException {
        
    /* this is a WMS-C implementation based on WebGeoCache and a 
     * GateKeeper running on Tomcat. The gatekeeper war can be 
     * downloaded from http://www.geonorge.no/cache/gatekeeper.war */ 
    URL url = new 
URL("http://opencache.statkart.no/gatekeeper/gk/gk.open?REQUEST=GetCapabilities";);

    // try to connect to given URL
    new WebMapServer(url);
        
}
{code} 


-- 
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

       

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to