WFS request failed

4072
2
04-21-2011 03:32 AM
Labels (1)
ChandreshMakwana
New Contributor
Hello,
We are working on ArcGIS server 9.3 Enterprise Basic version, where we have published a Geodata service with WFS capability enabled. Using WFS capability, we want to do spatial selection of features based on the GML polygon geometry described in the OGC filter. Here is the typical request XML (which is failing with the response provided below):

WFS Request XML:

<wfs:GetFeature version="1.1.0" service="WFS" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://appolo/wfsconnector/schema/wfs/1.0.0/WFS-capabilities.xsd">
  <wfs:Query typeName="SearchFeatureClass">
    <ogc:Filter type="spatialOps">
      <ogc:Intersects>
        <ogc:PropertyName>Shape</ogc:PropertyName>
        <gml:Polygon srsName="epsg:32632">
          <gml:outerBoundaryIs>
            <gml:LinearRing>
              <gml:coordinates>
                484124.936,6478332.323 485002.284,6478332.323 485002.284,6479035.891 484128.556,6479035.891 484124.936,6478332.323
              </gml:coordinates>
            </gml:LinearRing>
          </gml:outerBoundaryIs>
        </gml:Polygon>
      </ogc:Intersects>
    </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

WFS Response XML:

<ows:ExceptionReport version='1.1.0' language='en' xmlns:ows='http://www.opengis.net/ows'>
  <ows:Exception exceptionCode='InvalidParameterValue'>
    <ows:ExceptionText>Wrong coordinates.
    </ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

Any help / hint would be appreciated.
0 Kudos
2 Replies
TonyContreras
Occasional Contributor
From the error, it looks like there is some issue with the geometry/coordinates included in the request.

WFS version 1.1.0 uses the traditional axis order for geographic and cartographic systems as latitude/longitude (y/x), so switching the order of coordinates in your request may fix it.

<gml:coordinates>
6478332.323,484124.936 6478332.323,485002.284 6479035.891,485002.284 6479035.891,484128.556 6478332.323,484124.936
</gml:coordinates>
0 Kudos
YingqiTang
New Contributor
Hi,

It looks like you formed a WFS 1.1.0 request with GML2 in the filter, which is invalid, instead you should use the GML3, see sample below:

<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='highways' srsName="urn:ogc:def:crs:EPSG:6.9:4326">
      <ogc:Filter>
     <ogc:Intersects>
      <ogc:PropertyName>Shape</ogc:PropertyName>      
      <gml:Polygon srsName="urn:ogc:def:crs:EPSG:6.9:4326">
       <gml:exterior>
        <gml:LinearRing>
         <gml:posList>37.80436 -122.408325 37.804235 -122.409347 37.804188 -122.409939 37.803949 -122.411573 37.803693 -122.413784 37.803549 -122.414876 37.803925 -122.415544 37.805164 -122.417221 37.805402 -122.415251 37.80562 -122.413607 37.806011 -122.410294 37.806647 -122.405593 37.805887 -122.404352 37.80533 -122.403602 37.805138 -122.403182 37.804959 -122.40352 37.804759 -122.40517 37.804689 -122.405963 37.804447 -122.407466 37.80436 -122.408325</gml:posList>
        </gml:LinearRing>
       </gml:exterior>
      </gml:Polygon>
     </ogc:Intersects>
    </ogc:Filter>
     </wfs:Query> 
  </wfs:GetFeature>


Thanks,
0 Kudos