title: WFS GetFeature request via http POST does not work with ArcGIS
body: <p>The following WFS GetFeature request works with no problem with Geoserver but it fails with ArcGIS.</p>
  
  <p>JavaScript call:</p>
  
  <pre><code>jQuery.ajax({
          type: "POST",
          url: "http://......",
          data: "...",
          headers: {
              'Content-Type': 'application/xml'
          },
          dataType: 'xml',
          error: function (xhr,status,error){
              console.debug(status + " - "+ error);
          },
          success: callBack
      });
  </code></pre>
  
  <p>POST body (data):</p>
  
  <pre><code>&lt;GetFeature xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs  http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"&gt;
  &lt;Query typeName="WellHole" srsName="EPSG:3857"&gt;
  &lt;Filter xmlns="http://www.opengis.net/ogc"&gt;
  &lt;PropertyIsEqualTo&gt;
  &lt;PropertyName&gt;OBJECTID&lt;/PropertyName&gt;
  &lt;Literal&gt;402&lt;/Literal&gt;
  &lt;/PropertyIsEqualTo&gt;
  &lt;/Filter&gt;
  &lt;/Query&gt;
  &lt;/GetFeature&gt;
  </code></pre>
  
  <p>JavaScript error (client):</p>
  
  <pre><code>XMLHttpRequest cannot load http://..../MapServer/WFSServer. Response for preflight has invalid HTTP status code 400
  </code></pre>
  
  <p>ArcGIS server error (server):</p>
  
  <pre><code>Error handling request to service 'Target/OGDR_Fahud.MapServer'. AutomationException: 0x80070057 - Invalid http method. in '"esriGeoDatabaseDistributed.WFSServer"'
  
  com.esri.arcgis.discovery.ejb.ArcGISServiceException: AutomationException: 0x80070057 - Invalid http method. in '"esriGeoDatabaseDistributed.WFSServer"' 
  at com.esri.arcgis.discovery.ejb.impl.GenericServerBean.handleRequest(GenericServerBean.java:72) 
  at sun.reflect.GeneratedMethodAccessor3891.invoke(Unknown Source) 
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
  at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:162) at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:144) at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:164) at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:92) at sun.reflect.GeneratedMethodAccessor3890.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:162) at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:144) at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:122) at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:221) at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:174) at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:136) at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:238) at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:129) at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:196) at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:149) at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:71) at org.apache.openejb.server.ejbd.KeepAliveServer$Session.service(KeepAliveServer.java:213) at org.apache.openejb.server.ejbd.KeepAliveServer.service(KeepAliveServer.java:233) at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:66) at org.apache.openejb.server.ServicePool$2.run(ServicePool.java:91) at org.apache.openejb.server.ServicePool$3.run(ServicePool.java:120) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.esri.arcgis.discovery.servicelib.AGSException: AutomationException: 0x80070057 - Invalid http method. in '"esriGeoDatabaseDistributed.WFSServer"' at com.esri.arcgis.discovery.servicelib.impl.RemoteServiceImpl.handleRequest(RemoteServiceImpl.java:98) at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179) at com.sun.proxy.$Proxy43.handleRequest(Unknown Source) at com.esri.arcgis.discovery.ejb.util.EJBBase.handleRequestBase(EJBBase.java:548) at com.esri.arcgis.discovery.ejb.impl.GenericServerBean.handleRequest(GenericServerBean.java:70) ... 29 more Caused by: java.lang.Exception: AutomationException: 0x80070057 - Invalid http method. in '"esriGeoDatabaseDistributed.WFSServer"' at com.esri.arcgis.discovery.servicelib.impl.ServiceImpl.handleRequest(ServiceImpl.java:244) at com.esri.arcgis.discovery.servicelib.impl.RemoteServiceImpl.handleRequest(RemoteServiceImpl.java:92) at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) ... 3 more Caused by: AutomationException: 0x0 - null at com.esri.arcgis.interop.NativeObjRef.nativeVtblInvokeNative(Native Method) at com.esri.arcgis.interop.NativeObjRef.nativeVtblInvoke(Unknown Source) at com.esri.arcgis.interop.NativeObjRef.invoke(Unknown Source) at com.esri.arcgis.interop.Dispatch.vtblInvoke(Unknown Source) at com.esri.arcgis.system.IWebRequestHandlerProxy.handleStringWebRequest(Unknown Source) at com.esri.arcgis.discovery.servicelib.impl.SOThread.a(SOThread.java:1010) at com.esri.arcgis.discovery.servicelib.impl.SOThread.a(SOThread.java:692) at com.esri.arcgis.discovery.servicelib.impl.SOThread.run(SOThread.java:446)
  </code></pre>
  
  <p>And I have also noticed the following:</p>
  
  <p>1) If I use the POST request above (same code) with Geoserver's TestServlet (demo section on the web interface) it works.</p>
  
  <p>2) The following http GET request works with ArcGIS:</p>
  
  <pre><code>http://..../MapServer/WFSServer?service=WFS&amp;request=getfeature&amp;version=1.1.1&amp;typename=wellhole&amp;Filter=%3Cogc:Filter%3E%3Cogc:PropertyIsEqualTo%3E%3Cogc:PropertyName%3EOBJECTID%3C/ogc:PropertyName%3E%3Cogc:Literal%3E402%3C/ogc:Literal%3E%3C/ogc:PropertyIsEqualTo%3E%3C/ogc:Filter%3E
  </code></pre>
  
  <p>Please help.</p>