Permalink
Browse files

add getmap tests with external SLDs

- check working sld
- check 404
- check invalid protocol (add file:// once mapserver/mapserver#4703 is merged)
  • Loading branch information...
tbonfort committed Jul 27, 2013
1 parent 7a07055 commit 0060e6248592c1028bf8afff6bb5e00a6c3167dd
View
@@ -0,0 +1,52 @@
<?xml version="1.0"?>
<StyledLayerDescriptor version="1.0.0">
<NamedLayer>
<Name>popplace</Name>
<UserStyle>
<Title>xxx</Title>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Geometry>
<PropertyName>locatedAt</PropertyName>
</Geometry>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
</Mark>
<Size>14.0</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
<NamedLayer>
<Name>popplace</Name>
<UserStyle>
<Title>xxx</Title>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Geometry>
<PropertyName>locatedAt</PropertyName>
</Geometry>
<Graphic>
<Mark>
<WellKnownName>star</WellKnownName>
<Fill>
<CssParameter name="fill">#ff0000</CssParameter>
</Fill>
</Mark>
<Size>10.0</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
@@ -0,0 +1,8 @@
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://ogc.dmsolutions.ca/wms/1.1.0/exception_1_1_0.dtd">
<ServiceExceptionReport version="1.1.0">
<ServiceException>
msSLDApplySLDURL: WMS server error. Could not open SLD http://localhost:8000/wxs/etc/repeat.sld.notfound and save it in temporary file /tmp/51f3ea6b_1220_0.sld.xml. Please make sure that the sld url is valid and that the temporary path is set. The temporary path can be defined for example by setting TMPPATH in the map file. Please check the MapServer documentation on temporary path settings.
msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed with status 404 () for http://localhost:8000/wxs/etc/repeat.sld.notfound
</ServiceException>
</ServiceExceptionReport>
@@ -0,0 +1,8 @@
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://ogc.dmsolutions.ca/wms/1.1.0/exception_1_1_0.dtd">
<ServiceExceptionReport version="1.1.0">
<ServiceException>
msSLDApplySLDURL: WMS server error. Could not open SLD myproto://localhost:8000/wxs/etc/repeat.sld.notfound and save it in temporary file /tmp/51f3ea6b_1222_0.sld.xml. Please make sure that the sld url is valid and that the temporary path is set. The temporary path can be defined for example by setting TMPPATH in the map file. Please check the MapServer documentation on temporary path settings.
msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 1 (Protocol myproto not supported or disabled in libcurl) for myproto://localhost:8000/wxs/etc/repeat.sld.notfound
</ServiceException>
</ServiceExceptionReport>
Binary file not shown.
View
@@ -40,6 +40,9 @@
# Generate map image with symbols drawn as filled mark symbol
# RUN_PARMS: wms_get_map_mark_symbol_sld.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-68.125,42,-58.375,48.5&FORMAT=image/png; mode=24bit&WIDTH=300&HEIGHT=200&STYLES=&LAYERS=popplace&sld_body=<StyledLayerDescriptor version=%221.0.0%22><NamedLayer><Name>popplace</Name><UserStyle><Title>xxx</Title><FeatureTypeStyle><Rule><PointSymbolizer><Geometry><PropertyName>locatedAt</PropertyName></Geometry><Graphic><Mark><WellKnownName>star</WellKnownName><Fill><CssParameter name=%22fill%22>#ff0000</CssParameter></Fill></Mark><Size>10.0</Size></Graphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>" > [RESULT_DEMIME]
# RUN_PARMS: wms_get_map_repeated_layer_sld.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-68.125,42,-58.375,48.5&FORMAT=image/png; mode=24bit&WIDTH=300&HEIGHT=200&STYLES=&LAYERS=popplace&sld_body=<StyledLayerDescriptor version=%221.0.0%22><NamedLayer><Name>popplace</Name><UserStyle><Title>xxx</Title><FeatureTypeStyle><Rule><PointSymbolizer><Geometry><PropertyName>locatedAt</PropertyName></Geometry><Graphic><Mark><WellKnownName>circle</WellKnownName><Fill><CssParameter name=%22fill%22>#000000</CssParameter></Fill></Mark><Size>14.0</Size></Graphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer><NamedLayer><Name>popplace</Name><UserStyle><Title>xxx</Title><FeatureTypeStyle><Rule><PointSymbolizer><Geometry><PropertyName>locatedAt</PropertyName></Geometry><Graphic><Mark><WellKnownName>star</WellKnownName><Fill><CssParameter name=%22fill%22>#ff0000</CssParameter></Fill></Mark><Size>10.0</Size></Graphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>" > [RESULT_DEMIME]
# RUN_PARMS: wms_get_map_repeated_layer_ext_sld.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-68.125,42,-58.375,48.5&FORMAT=image/png; mode=24bit&WIDTH=300&HEIGHT=200&STYLES=&LAYERS=popplace&sld=http://localhost:8000/wxs/etc/repeat.sld" > [RESULT_DEMIME]
# RUN_PARMS: wms_get_map_ext_sld_404.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-68.125,42,-58.375,48.5&FORMAT=image/png; mode=24bit&WIDTH=300&HEIGHT=200&STYLES=&LAYERS=popplace&sld=http://localhost:8000/wxs/etc/repeat.sld.notfound" > [RESULT_DEMIME]
# RUN_PARMS: wms_get_map_ext_sld_proto.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-68.125,42,-58.375,48.5&FORMAT=image/png; mode=24bit&WIDTH=300&HEIGHT=200&STYLES=&LAYERS=popplace&sld=myproto://localhost:8000/wxs/etc/repeat.sld.notfound" > [RESULT_DEMIME]
# Generate map image by using a filter containing quotes

0 comments on commit 0060e62

Please sign in to comment.