[mapserver-users] Parens making GetFeature crash with Mapserver 7

thomas bonfort thomas.bonfort at gmail.com
Thu Sep 25 01:48:53 PDT 2014


Hi Âlex,

I've tried your testcase (or at least the closest I could reproduce)
in the msautotest/wxs directory with

export REQUEST_METHOD=POST
export QUERY_STRING=map=wfs_filter.map
echo '<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs"
service="WFS" version="1.1.0"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Query
typeName="popplace" srsName="EPSG:4326"
xmlns:feature="http://mapserver.gis.umn.edu/mapserver"><ogc:Filter
xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo
matchCase="false"><ogc:PropertyName>NAME</ogc:PropertyName><ogc:Literal>foo
(bar)</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter></wfs:Query></wfs:GetFeature>'
| mapserv

and I get back a reasonable result:

<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
   xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
   xmlns:gml="http://www.opengis.net/gml"
   xmlns:wfs="http://www.opengis.net/wfs"
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver
http://localhost/path/to/wfs_simple?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=popplace&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1
 http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
   <gml:boundedBy>
      <gml:Null>missing</gml:Null>
   </gml:boundedBy>
</wfs:FeatureCollection>


can you check that your testcase is still failing as there have been
quite a few recent changes in that part of the code.

regards,
thomas

On 5 September 2014 12:50, Alexandre Saunier
<alexandre.saunier at camptocamp.com> wrote:
> Hi,
>
> I am testing the coming Mapserver 7 and have noticed that WFS GetFeature
> requests crash when using parens in a property value filter. Actually only
> the opening paren seems to be a problem, not the closing one.
>
> For instance:
>
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
> version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Query
> typeName="feature:monuments" srsName="EPSG:3857"
> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"><ogc:Filter
> xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo
> matchCase="false"><ogc:PropertyName>nom</ogc:PropertyName><ogc:Literal>foo</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter></wfs:Query></wfs:GetFeature>
>
> works as expected, whereas
>
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
> version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Query
> typeName="feature:monuments" srsName="EPSG:3857"
> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"><ogc:Filter
> xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo
> matchCase="false"><ogc:PropertyName>nom</ogc:PropertyName><ogc:Literal>foo
> (bar)</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter></wfs:Query></wfs:GetFeature>
>
> returns
>
> <ows:ExceptionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> version="1.1.0" xmlns:ows="http://www.opengis.net/ows" language="en-US"
> xsi:schemaLocation="http://www.opengis.net/ows
> http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd">
>   <ows:Exception locator="filter" exceptionCode="InvalidParameterValue">
>     <ows:ExceptionText>msWFSGetFeature(): WFS server error. Wrong number of
> filter elements, one filter must be specified for each feature type listed
> in the TYPENAME parameter.</ows:ExceptionText>
>   </ows:Exception>
> </ows:ExceptionReport>
>
> Both requests work fine with Mapserver 6.0.1.
>
> Is it a known problem with Mapserver 7? No idea if this happens with
> intermediate Mapserver versions.
> I have found no issue about that on Mapserver's github.
>
> Thanks,
> Alexandre
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the MapServer-users mailing list