I am trying to add a layer to an ESRI ArcGIS Javascript API map using a WFS based on geoserver. The back end is pulling from POSTGIS, if it makes a difference. The WFS appears to work fine in openlayers, but not in the esri javascript api. Looking at the http requests, they are totally different. Specifically the GetFeatures Request. In openlayers this is the request:


With a nice json response. ESRI requires me to use their proxy, but even still , the request is a POST and looks like this:


<?xml version='1.0' encoding='utf-8'?>
 version='1.1.0' service='WFS' maxFeatures='100'>
 <wfs:Query typeName='conryservices:zip_polygons' srsName='EPSG:4326'>
  <ogc:Filter xmlns:ogc='http://www.opengis.net/ogc'>
    <gml:Box srsName='EPSG:4326'>
      <gml:coordinates>-122.94620660400169,42.29605553470161 -122.72579339599417,42.395904817819165</gml:coordinates>

I'm not sure what I'm missing here, but are these running on the same standard?

  • 1
    You are aware that you require licensing to use the ESRI JSAPI, even if it is not consuming any ESRI licensed product, right? ref:developers.arcgis.com/javascript/latest/guide/licensing/… quote: If the app does not use ArcGIS Online nor ArcGIS Enterprise, you must... ...you'll have to purchase a paid ArcGIS Online Deployment Plan when you're ready to deploy your app to production (even if your app does not use ArcGIS Online data/services).
    – Mike
    Commented Sep 11, 2018 at 14:42
  • @mike I did not know that. Any idea when they started doing this? Commented Sep 12, 2018 at 15:16

1 Answer 1


I got this to work. Here is how:

1) Forget the proxy, add you url to the esri corsEnabledServers like this:


notice that you need to include the port of it's non standard (cause geoserver usually uses 8080 that's not that of an unusual case)

2) For whatever reason, not sure if this is ESRI or geoserver using WFS version 1.0.0 works but using 1.1.0 does not. Both geoserver and the esri javascript API claim to support 1.1.0, so not sure what the deal is there.

That should make this work. That said I have to add a word of caution. The whole point of using a WFS instead of another solution like WMS or WCS is to access features, not tiles. ESRI's WFS layer doesn't inherit from ESRI's FeatureLayer so its functionality is very limited. I will be posting another question on using attribute based renderers, but I fear it may not be supported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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