Uploaded image for project: 'GeoServer'
  1. GEOS-8063

WMS1.3.0 SLD definition can break getcapabilities

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 2.8.3
    • Fix Version/s: 2.12.0
    • Component/s: WMS
    • Labels:
      None
    • Environment:

      Debian Linux 7, tomcat 6, Java 7

      Description

      Observed by a customer:

      When a SLD is defined without a Title nested in the Description element (which is compliant in regard to the SLD specifications, relying on https://github.com/geotools/geotools/blob/master/modules/library/api/src/main/java/org/geotools/styling/Style.java#L39), the Description object used in the GetCapabilities generation can have a title set to null, ending up with a missing Title element:

              <Style>
                <Name>ref_cad:app_cadastrapp_parcelle</Name>
                <LegendURL width="20" height="20">
                  <Format>image/png</Format>
                  <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="https://portail.sig.rennesmetropole.fr/geoserver/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=ref_cad%3Aapp_cadastrapp_parcelle"/>
                </LegendURL>
              </Style>
      

      This might break the GetCapabilities XSD compliance. Here is a result of xmllint on the Getcapabilities output:

      $ xmllint --valid --schema http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd extra-prod-getcap.xml
      [...]
      extra-prod-getcap.xml:5479: element LegendURL: Schemas validity error : Element '{http://www.opengis.net/wms}LegendURL': This element is not expected. Expected is ( {http://www.opengis.net/wms}Title ).
      [...]
      extra-prod-getcap.xml:5486: element LegendURL: Schemas validity error : Element '{http://www.opengis.net/wms}LegendURL': This element is not expected. Expected is ( {http://www.opengis.net/wms}Title ).
      extra-prod-getcap.xml fails to validate
      

      Proposition: one possible fix would be to reuse the SLD name if Description.title null, since the Title element needs to be in the GetCapabilities response.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pmauduit Pierre Mauduit
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: