Select to view content in your preferred language

WFS GetFeature PropertyName is it mandatory?

4747
4
11-02-2011 06:37 AM
Labels (1)
OzanEmem
Deactivated User
As far as i know PropertyName element for BBOX was mandatory in WFS Filter 1.0.0. However it shouldnt be mandatory in 1.1.0. therefore following filter should be valid and be processed correctly in 1.1.0 but not in 1.0.0

<ogc:Filter>
 <ogc:BBOX>
  <gml:Envelope>
   <gml:lowerCorner></gml:lowerCorner>
   <gml:upperCorner></gml:upperCorner>
  </gml:Envelope>
 </ogc:BBOX>
</ogc:Filter>


however i get exception from WFS (Arcgis 10 SP2)  without

<ogc:PropertyName>...</ogc:PropertyName>

<ows:ExceptionText>The expected xml element PropertyName was not found.</ows:ExceptionText>


is there a configuration for this or is this element mandatatory in ArcGIS Server WFS?
0 Kudos
4 Replies
TonyContreras
Deactivated User
This parameter should not be required for version 1.0.0 or 1.1.0, both specifications include the following statement:
"If no  <PropertyName> elements are specified, then  all feature properties should be
fetched."

It looks like you are using a POST method request. Do you get the same error if using a GET method request in a URL?

This may be a bug, if you contact ESRI Support they can help determine this and log the issue.
0 Kudos
OzanEmem
Deactivated User
thanks for the response.
yes, we get the same exception for GET and POST methods, when the filter is used.

I presume that it works with BBOX key in KVP as there is no such element (://example.com/wfs?service=WFS&version=1.1.0&REQUEST=GetFeature&BBOX=-71.00,42.00,-72.00,43.00..........). But using KVP is not an option as we are writing complex query filters.
0 Kudos
YingqiTang
Emerging Contributor
Hi,

What does your POST request look exactly? PropertyName is NOT mandatory at all for 1.0.0/1.1.0 in our implementation, and you can simply use a request like below to request features:

<wfs:GetFeature
     service = 'WFS' 
     version = '1.1.0' 
     xmlns:wfs = 'http://www.opengis.net/wfs' 
     xmlns:ogc = 'http://www.opengis.net/ogc' 
     xmlns:gml = 'http://www.opengis.net/gml' 
     xmlns:esri = 'http://www.esri.com' 
     xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance' 
     xsi:schemaLocation='http://www.opengis.net/wfs ../wfs/1.1.0/WFS.xsd'> 
     <wfs:Query typeName='Fittings'> 
       <ogc:Filter>
          <ogc:BBOX>
            <ogc:PropertyName>Shape</ogc:PropertyName>
        <gml:Envelope srsName="urn:ogc:def:crs:EPSG:6.9:2264"> 
            <gml:lowerCorner>2311840.592 719323.623</gml:lowerCorner> 
            <gml:upperCorner>2313184.839 720432.801</gml:upperCorner> 
          </gml:Envelope>
          </ogc:BBOX>
       </ogc:Filter>
     </wfs:Query> 
  </wfs:GetFeature>


Thanks
0 Kudos
YingqiTang
Emerging Contributor
Sorry, I mistake the question a little bit. <PropertyName> is required in the <Filter> of course in your situation, but this <PropertyName> is NOT the propertyName parameter described in spec, which is used to define the list of properties to return in GML.

You mixture the two different concepts here.

Thanks.
0 Kudos