Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I spent a long time looking for an example using OpenLayers to call ArcGIS WFS, however, almost none is found... currently the code I wrote is based on the example of GeoServer, however, no feature is returned...

new OpenLayers.Layer.Vector("ArcGIS WFS layer", {
    strategies: [new OpenLayers.Strategy.BBOX()],
    protocol: new OpenLayers.Protocol.WFS({
        version: "1.1.0",
        srsName: "urn:ogc:def:crs:EPSG:6.9:26912",
            url: "http://XXXX/Geodatabase_SDE/geodataserver/WFSServer?request=getFeature",
        featureType: "TEST_SAMPLE",
        featureNS: "http://XXXX/Geodatabase_SDE/geodataserver/WFSServer",
        geometryName: "Shape"

I am wondering if it's doable in OpenLayers? if so, an example is much appreciated!



<wfs:GetFeature service="WFS" version="1.1.0" xmlns:wfs="" xmlns:xsi="" xsi:schemaLocation="">
  <wfs:Query srsName="EPSG:26912" typeName="feature:TEST_SAMPLE" xmlns:feature="http://XXXX/Geodatabase_SDE/geodataserver/WFSServer">
    <ogc:Filter xmlns:ogc="">
        <gml:Envelope srsName="EPSG:26912" xmlns:gml="">
            447517.58546862 4364229.0103902
            455008.41453138 4384331.9496098

Response XML:

<wfs:FeatureCollection xmlns:Geodatabase_SDE="http://XXXXX/Geodatabase_SDE/GeoDataServer/WFSServer" xmlns:gml="" xmlns:wfs="" xmlns:xlink="" xmlns:xsi="" xsi:schemaLocation="http://XXXXX/Geodatabase_SDE/GeoDataServer/WFSServer http://XXXXX/Geodatabase_SDE/geodataserver/WFSServer?request=DescribeFeatureType%26version=1.1.0%26typename=TEST_SAMPLE">
    <gml:Envelope srsName="EPSG:26912">
        NaN NaN
        NaN NaN
share|improve this question
Do you have a public facing URL we can test on? – CaptDragon Jan 25 '12 at 14:12
i don't have public accessible WFS. i was looking for one in order to test, but didn't find anything online... – Simon Jan 25 '12 at 14:58
Yeah, i couldn't find a public ArcGIS WFS service either. – CaptDragon Jan 25 '12 at 15:09

1 Answer 1

up vote 3 down vote accepted

What is the response from the server (the XML that is returned) - does it show any warnings?

Also try setting your srsName to a simpler form such as:

srsName: "EPSG:26912"

I've been through the same (unpleasant) process of configuring OpenLayers and MapServer WFS. There are details at

The most confusing piece was that even if the XML request included the SRS, I also had to pass it as a parameter in the URL:


This may or may not apply to all WFS servers - I'd be interested to know if it is also the case with ArcGIS.

A few other things to check are:

  • is the projection set up on the ArcGIS Server
  • if you run a profiler on your database, what SQL is running - and are the correct bounding boxes being used?
  • what projection is your OpenLayers basemap in? Do you have proj4js added into the web page?

The request looks good, but clearly the repsonse and the NaN (not a number) show something is wrong.

share|improve this answer
thanks. I just added the response XML. – Simon Jan 25 '12 at 13:47
@Simon Can you also post the request XML - this should include the bounds sent to the server. – geographika Jan 25 '12 at 14:47
just updated! thanks for your attention. – Simon Jan 25 '12 at 15:04
thanks very much for advice. since it's not me setting up the arcgis server, it may take some time to figure out the projection issue on server...and i assume it's very possible due to that.. i just added VERSION&srsName to URL, not succeed. – Simon Jan 25 '12 at 16:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.