Menu

#15 WMS 1.1 compliance test generates invalid layer/style combinations in the

old
open
nobody
None
1
2013-12-01
2013-11-23
Andrea Aime
No

The Test wms:wmsops-getmap-each-style test generates GetMap requests that appear to have always the same layer, and in turn each style in the capabilities document, instead of matching the style with the layers that do contain it.

For example:
http://localhost:8080/geoserver/wms?SERVICE=WMS&&StYlEs=cite_named_places&BbOx=-2.0,-1.0,2.0,6.0&SrS=EPSG%3A4326&LaYeRs=cite%3ABasicPolygons&WiDtH=100&VeRsIoN=1.1.1&FoRmAt=image%2Fpng&HeIgHt=100&ReQuEsT=GetMap

http://localhost:8080/geoserver/wms?SERVICE=WMS&&StYlEs=cite_road_segments&BbOx=-2.0,-1.0,2.0,6.0&SrS=EPSG%3A4326&LaYeRs=cite%3ABasicPolygons&WiDtH=100&VeRsIoN=1.1.1&FoRmAt=image%2Fpng&HeIgHt=100&ReQuEsT=GetMap

Neither of those styles is associated to BasicPolygons, and GeoServer will refuse to answer those requests because the styles refer to attributes not available in the BasicPolygons feature type.

This is happening on TeamEngine 4.0.3, deployed locally in Tomcat 7, using the r3 WMS 1.1.1 tests

Capabilities document attached for reference.

The ctl file seems to be trying to associate each style to a layer that contains it, but it seems it's failing to do so correctly.

1 Attachments

Discussion

  • Andrea Aime

    Andrea Aime - 2013-11-23

    The problem appears to be in this expression:

    <ctl:with-param name="preferred-name" select="string($capabilities/Capability//Layer[Name and Style/Name = $style and position()=1]/Name)"/>
    

    The position() of the element being tested (Layer) is 1 only for the first layer, but the test won't work for the other layers.
    Simply removing that extra check makes the test pass:

    <ctl:with-param name="preferred-name" select="string($capabilities/Capability//Layer[Name and Style/Name = $style]/Name)"/>
    
     

    Last edit: Andrea Aime 2013-11-23
  • Andrea Aime

    Andrea Aime - 2013-12-01

    I see Louis Bermudez merged this change in the WMS 1.1.1 trunk version of the tests, so I guess this one can be closed?

     

Log in to post a comment.

MongoDB Logo MongoDB