forked from MapServer/MapServer
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add metadata to optionally not emit root layer name in WMS Capabiliti…
…es XML (MapServer#5404)
- Loading branch information
1 parent
586cefe
commit 3f5b2ea
Showing
5 changed files
with
269 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
msautotest/wxs/expected/ows_wms_rootlayer_name_enabled_capabilities.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
Content-Type: text/xml; charset=UTF-8 | ||
|
||
<?xml version='1.0' encoding="UTF-8" standalone="no" ?> | ||
<WMS_Capabilities version="1.3.0" xmlns="http://www.opengis.net/wms" xmlns:sld="http://www.opengis.net/sld" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://mapserver.gis.umn.edu/mapserver http://localhost/path/to/ows?service=WMS&version=1.3.0&request=GetSchemaExtension"> | ||
|
||
<Service> | ||
<Name>WMS</Name> | ||
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. --> | ||
<Title>WMS_TEST</Title> | ||
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/ows?"/> | ||
<ContactInformation> | ||
</ContactInformation> | ||
<MaxWidth>4096</MaxWidth> | ||
<MaxHeight>4096</MaxHeight> | ||
</Service> | ||
|
||
<Capability> | ||
<Request> | ||
<GetCapabilities> | ||
<Format>text/xml</Format> | ||
<DCPType> | ||
<HTTP> | ||
<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/ows?"/></Get> | ||
<Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/ows?"/></Post> | ||
</HTTP> | ||
</DCPType> | ||
</GetCapabilities> | ||
<GetMap> | ||
<Format>image/png</Format> | ||
<Format>image/jpeg</Format> | ||
<Format>image/png; mode=8bit</Format> | ||
<Format>image/vnd.jpeg-png</Format> | ||
<Format>image/vnd.jpeg-png8</Format> | ||
<Format>application/x-pdf</Format> | ||
<Format>image/svg+xml</Format> | ||
<Format>image/tiff</Format> | ||
<Format>application/vnd.google-earth.kml+xml</Format> | ||
<Format>application/vnd.google-earth.kmz</Format> | ||
<DCPType> | ||
<HTTP> | ||
<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/ows?"/></Get> | ||
<Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/ows?"/></Post> | ||
</HTTP> | ||
</DCPType> | ||
</GetMap> | ||
<sld:DescribeLayer> | ||
<Format>text/xml</Format> | ||
<DCPType> | ||
<HTTP> | ||
<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/ows?"/></Get> | ||
<Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/ows?"/></Post> | ||
</HTTP> | ||
</DCPType> | ||
</sld:DescribeLayer> | ||
</Request> | ||
<Exception> | ||
<Format>XML</Format> | ||
<Format>INIMAGE</Format> | ||
<Format>BLANK</Format> | ||
</Exception> | ||
<sld:UserDefinedSymbolization SupportSLD="1" UserLayer="0" UserStyle="1" RemoteWFS="0" InlineFeature="0" RemoteWCS="0"/> | ||
<Layer> | ||
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. --> | ||
<Title>WMS_TEST</Title> | ||
<Abstract>WMS_TEST</Abstract> | ||
<CRS>EPSG:4326</CRS> | ||
<EX_GeographicBoundingBox> | ||
<westBoundLongitude>-1</westBoundLongitude> | ||
<eastBoundLongitude>-1</eastBoundLongitude> | ||
<southBoundLatitude>-1</southBoundLatitude> | ||
<northBoundLatitude>-1</northBoundLatitude> | ||
</EX_GeographicBoundingBox> | ||
<BoundingBox CRS="EPSG:4326" | ||
minx="-1" miny="-1" maxx="-1" maxy="-1" /> | ||
<Layer> | ||
<Title>roadgroup</Title> | ||
<Layer queryable="1" opaque="0" cascaded="0"> | ||
<Name>road2</Name> | ||
<Title>road</Title> | ||
<CRS>EPSG:43204</CRS> | ||
<EX_GeographicBoundingBox> | ||
<westBoundLongitude>-66.6333</westBoundLongitude> | ||
<eastBoundLongitude>-59.2921</eastBoundLongitude> | ||
<southBoundLatitude>42.3821</southBoundLatitude> | ||
<northBoundLatitude>48.2955</northBoundLatitude> | ||
</EX_GeographicBoundingBox> | ||
<BoundingBox CRS="EPSG:43204" | ||
minx="2.25898e+06" miny="-70747.9" maxx="2.61535e+06" maxy="495481" /> | ||
<Style> | ||
<Name>default</Name> | ||
<Title>default</Title> | ||
<LegendURL width="71" height="20"> | ||
<Format>image/png</Format> | ||
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost/path/to/ows?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=road2&format=image/png&STYLE=default"/> | ||
</LegendURL> | ||
</Style> | ||
<MinScaleDenominator>1500</MinScaleDenominator> | ||
</Layer> | ||
</Layer> | ||
</Layer> | ||
</Capability> | ||
</WMS_Capabilities> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
|
||
# Test WMS rootlayer_name_enabled | ||
# | ||
# REQUIRES: SUPPORTS=WMS | ||
# | ||
# The following tests exists primarily to test the ability of enabling/disabling | ||
# WMS service (see https://github.com/mapserver/mapserver/issues/5404). | ||
# | ||
|
||
# RUN_PARMS: ows_wms_rootlayer_name_enabled_capabilities.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&REQUEST=GetCapabilities" > [RESULT_DEVERSION] | ||
|
||
# Results expected | ||
# getcapabilities: root <Layer> element does not emit <Name> element | ||
|
||
MAP | ||
|
||
NAME WMS_TEST | ||
SHAPEPATH ./data | ||
|
||
WEB | ||
METADATA | ||
"wms_onlineresource" "http://localhost/path/to/ows?" | ||
"ows_enable_request" "DescribeLayer" | ||
"wms_enable_request" "!GetCapabilities !GetFeatureInfo GetMap" | ||
"wms_rootlayer_name_enabled" "false" | ||
END | ||
END | ||
|
||
PROJECTION | ||
"init=epsg:4326" | ||
END | ||
|
||
LAYER | ||
NAME road | ||
DATA road | ||
TEMPLATE "ttt" | ||
METADATA | ||
"wms_title" "road" | ||
"wms_description" "Roads of I.P.E." | ||
"wms_srs" "EPSG:43204" | ||
"wms_include_items" "all" | ||
"wms_ROAD_ID_alias" "ROAD_NAME" | ||
"ows_enable_request" "GetFeatureInfo" | ||
"wms_enable_request" "!GetCapabilities !GetMap" | ||
"wms_layer_group" "/roadgroup" | ||
END | ||
TYPE LINE | ||
STATUS ON | ||
PROJECTION | ||
"init=./data/epsg2:42304" | ||
END | ||
|
||
DUMP TRUE | ||
|
||
CLASSITEM "Name_e" | ||
CLASS | ||
NAME "Roads" | ||
SYMBOL 0 | ||
COLOR 220 0 0 | ||
END | ||
END # Layer | ||
|
||
LAYER | ||
NAME road2 | ||
DATA road | ||
TEMPLATE "ttt" | ||
METADATA | ||
"wms_title" "road" | ||
"wms_description" "Roads of I.P.E." | ||
"wms_srs" "EPSG:43204" | ||
"wms_include_items" "all" | ||
"gml_ROAD_ID_alias" "ROAD_NAME" | ||
"ows_enable_request" "GetFeatureInfo" | ||
"wms_enable_request" "GetCapabilities !GetMap" | ||
"wms_layer_group" "/roadgroup" | ||
END | ||
MINSCALEDENOM 1500 | ||
TYPE LINE | ||
STATUS ON | ||
PROJECTION | ||
"init=./data/epsg2:42304" | ||
END | ||
|
||
DUMP TRUE | ||
|
||
CLASSITEM "Name_e" | ||
CLASS | ||
NAME "Roads" | ||
SYMBOL 0 | ||
COLOR 220 0 0 | ||
END | ||
END # Layer | ||
|
||
LAYER | ||
NAME road3 | ||
DATA road | ||
TEMPLATE "ttt" | ||
METADATA | ||
"wms_title" "road" | ||
"wms_description" "Roads of I.P.E." | ||
"wms_srs" "EPSG:43204" | ||
"gml_include_items" "all" | ||
"ows_enable_request" "GetFeatureInfo" | ||
"wms_enable_request" "!GetCapabilities GetMap" | ||
"wms_layer_group" "/roadgroup" | ||
END | ||
TYPE LINE | ||
STATUS ON | ||
PROJECTION | ||
"init=./data/epsg2:42304" | ||
END | ||
|
||
DUMP TRUE | ||
|
||
CLASSITEM "Name_e" | ||
CLASS | ||
NAME "Roads" | ||
SYMBOL 0 | ||
COLOR 220 0 0 | ||
END | ||
END # Layer | ||
|
||
END # Map File |