Ticket #3596 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

WFS: PROPERTYNAME requires names to be ( ) quoted even when there's a single TYPENAME

Reported by: rouault Owned by: mapserverbugs
Priority: normal Milestone:
Component: WFS Server Version: unspecified
Severity: normal Keywords:
Cc: assefa

Description

In GET request, one cannot use currently PROPERTYNAME without quoting the value with ( ). This is indeed required when there are several values in TYPENAME, but when one uses a single TYPENAME, example 2 of WFS 1.1 spec (page 102) suggests that the parenthesis are not required :

http://www.someserver.com/wfs.cgi&
SERVICE=WFS&
VERSION=1.1.0&
REQUEST=GetFeature&
PROPERTYNAME=InWaterA_1M/wkbGeom,InWaterA_1M/tileId&
TYPENAME=InWaterA_1M

GeoServer? supports that syntax :

http://demo.opengeo.org/geoserver/wfs?MAXFEATURES=2&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=poi&PROPERTYNAME=NAME,MAINPAGE

wheras MapServer throws :

?xml version="1.0" encoding="ISO-8859-1"?>
<ows:ExceptionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ows="http://www.opengis.net/ows" version="1.1.0" language="en-US
 xsi:schemaLocation="http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd">
  <ows:Exception exceptionCode="InvalidParameterValue" locator="PROPERTYNAME">
    <ows:ExceptionText>msWFSGetFeature(): WFS server error. Optional PROPERTYNAME parameter. A list of properties may be specified for each type name.
Example TYPENAME=name1&amp;name2&amp;PROPERTYNAME=(prop1,prop2)(prop1)</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

Attached patch fixes that.

Attachments

mapwfs_ticket3596.patch Download (1.4 KB) - added by rouault 3 years ago.

Change History

Changed 3 years ago by rouault

Changed 3 years ago by rouault

  • cc assefa added

Changed 3 years ago by assefa

  • status changed from new to closed
  • resolution set to fixed

Thanks. I was not aware of this. Committed in r10699.

Note: See TracTickets for help on using tickets.