Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapserver 7 returns an error when WFS GetFeature filters contain parens #4986

Closed
asaunier opened this issue Sep 5, 2014 · 2 comments
Closed
Assignees
Milestone

Comments

@asaunier
Copy link

asaunier commented Sep 5, 2014

Hi,

with Mapserver 7 (built on Sep, 2nd) I have noticed that WFS GetFeature requests return an error 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.

I have the same problem with another dev version built a few months ago.

@sdlime sdlime self-assigned this Sep 5, 2014
@sdlime sdlime added this to the 7.0 Release milestone Sep 5, 2014
@sdlime
Copy link
Member

sdlime commented Sep 5, 2014

Issue seems unrelated to RFC 91 changes. --Steve

@rouault rouault assigned rouault and unassigned sdlime Sep 6, 2014
rouault added a commit to MapServer/msautotest_DEPRECATED that referenced this issue Sep 6, 2014
@rouault
Copy link
Contributor

rouault commented Sep 6, 2014

Fixed. The issue could been triggered with requests on multiple layers/filters on previous releases. WFS 2.0 work just made the bug more easily triggered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants