<div dir="ltr"><div><div>Hi,<br><br></div>I get exactly the same result as Yves. I can't get the POST request to work with QGIS server 2.14. <br><br>Therefore replicating this example with OpenLayers and QGIS server doesn't seem to be possible.<br><a href="http://dev.openlayers.org/examples/wfs-spatial-filter.html" target="_blank">http://dev.openlayers.org/<wbr>examples/wfs-spatial-filter.<wbr>html</a><br><br></div><div>v.<br></div><br>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>--------------<br><h1 style="color:rgb(0,0,0);font-family:"Times New Roman";font-style:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">[Qgis-developer] WFS Post Request in QGIS server 2.14</h1><b style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Yves Jacolin</b><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none;background-color:rgb(255,255,255)"><span> </span></span><a href="mailto:qgis-developer%40lists.osgeo.org?Subject=Re%3A%20%5BQgis-developer%5D%20WFS%20Post%20Request%20in%20QGIS%20server%202.14&In-Reply-To=%3C2639912.EVDDFNQczy%40tatras%3E" title="[Qgis-developer] WFS Post Request in QGIS server 2.14" style="font-family:"Times New Roman";font-size:medium;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">yjacolin at free.fr<span> </span></a><br style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><i style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Thu Apr 14 04:09:43 PDT 2016</i><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none;background-color:rgb(255,255,255)"></span><ul style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><li>Previous message (by thread):<span> </span><a href="http://lists.osgeo.org/pipermail/qgis-developer/2016-April/042365.html" target="_blank">[Qgis-developer] GRASS plugin and environmental variables</a></li><li>Next message (by thread):<span> </span><a href="http://lists.osgeo.org/pipermail/qgis-developer/2016-April/042358.html" target="_blank">[Qgis-developer] Plugin [976] QAD approval notification.</a></li><li><b>Messages sorted by:</b><span> </span><a href="http://lists.osgeo.org/pipermail/qgis-developer/2016-April/date.html#42359" target="_blank">[ date ]</a><span> </span><a href="http://lists.osgeo.org/pipermail/qgis-developer/2016-April/thread.html#42359" target="_blank">[ thread ]</a><span> </span><a href="http://lists.osgeo.org/pipermail/qgis-developer/2016-April/subject.html#42359" target="_blank">[ subject ]</a><span> </span><a href="http://lists.osgeo.org/pipermail/qgis-developer/2016-April/author.html#42359" target="_blank">[ author ]</a></li></ul><hr style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><pre style="white-space:pre-wrap;color:rgb(0,0,0);font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px">Hello,

I try to run a WFS POST request with QGIS server 2.14 without success. I can 
get the answer from the similar GET request but not with the POST method.

Anyone tried with success such request? Any working example even if I have no 
access to the data, just to llok at the form of the request structure?

Here is my request with curl:

curl --data '<wfs:GetFeature xmlns:wfs="<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.<wbr>net/wfs</a>" 
service="WFS" version="1.0.0" maxFeatures="200" 
xsi:schemaLocation="<a href="http://www.opengis.net/wfs" target="_blank">http://<wbr>www.opengis.net/wfs</a> 
<a href="http://schemas.opengis.net/wfs/1.0.0/wfs.xsd" target="_blank">http://schemas.opengis.net/<wbr>wfs/1.0.0/wfs.xsd</a>" 
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/<wbr>2001/XMLSchema-instance</a>"><wfs:<wbr>Query 
typeName="borders" srsName="EPSG:2154"><ogc:<wbr>Filter 
xmlns:ogc="<a href="http://www.opengis.net/ogc" target="_blank">http://www.opengis.<wbr>net/ogc</a>"><ogc:PropertyIsLike matchCase="false" 
wildCard="*" singleChar="." 
escapeChar="!"><ogc:<wbr>PropertyName>FIPS</ogc:<wbr>PropertyName><ogc:Literal>FR</<wbr>ogc:Literal></ogc:<wbr>PropertyIsLike></ogc:Filter></<wbr>wfs:Query></wfs:GetFeature>' 
'<a href="http://localhost:8081/wms/test2?username=admin&cache_version=014489def2e244d48a7dcd581c565331" target="_blank">http://localhost:8081/wms/<wbr>test2?username=admin&cache_<wbr>version=<wbr>014489def2e244d48a7dcd581c5653<wbr>31</a>' 
-X POST -H 'Host: localhost' -H 'Content-Type: application/xml'

Answer:

<wfs:FeatureCollection xmlns:wfs="<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.<wbr>net/wfs</a>" 
xmlns:ogc="<a href="http://www.opengis.net/ogc" target="_blank">http://www.opengis.<wbr>net/ogc</a>" xmlns:gml="<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.<wbr>net/gml</a>" 
xmlns:ows="<a href="http://www.opengis.net/ows" target="_blank">http://www.opengis.<wbr>net/ows</a>" 
xmlns:xlink="<a href="http://www.w3.org/1999/xlink" target="_blank">http://www.w3.<wbr>org/1999/xlink</a>" xmlns:qgs="<a href="http://www.qgis.org/gml" target="_blank">http://www.qgis.<wbr>org/gml</a>" 
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/<wbr>2001/XMLSchema-instance</a>" 
xsi:schemaLocation="<a href="http://www.opengis.net/wfs" target="_blank">http://<wbr>www.opengis.net/wfs</a> 
<a href="http://schemas.opengis.net/wfs/1.0.0/wfs.xsd" target="_blank">http://schemas.opengis.net/<wbr>wfs/1.0.0/wfs.xsd</a> <a href="http://www.qgis.org/gml" target="_blank">http://www.qgis.org/gml</a> 
<a href="http://testgmf.sig.cloud.camptocamp.net/test/wsgi/mapserv_proxy?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=borders&amp;OUTPUTFORMAT=XMLSCHEMA" target="_blank">http://testgmf.sig.cloud.<wbr>camptocamp.net/test/wsgi/<wbr>mapserv_proxy?SERVICE=WFS&<wbr>VERSION=1.0.0&REQUEST=<wbr>DescribeFeatureType&TYPENAME=<wbr>borders&OUTPUTFORMAT=XMLSCHEMA</a><wbr>"><gml:boundedBy>
 <gml:Box srsName="EPSG:2154">
  <gml:coordinates cs="," ts=" ">-2180092.42950479,4708810.<wbr>95456554 
4283217.86913478,9600922.<wbr>11590408</gml:coordinates>
 </gml:Box>
</gml:boundedBy>

But I should get one feature.

Thanks,

Y.
</pre></div>