[Qgis-developer] WFS Post Request in QGIS server 2.14

Yves Jacolin yjacolin at free.fr
Thu Apr 14 04:09:43 PDT 2016


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

Answer:

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

But I should get one feature.

Thanks,

Y.


More information about the Qgis-developer mailing list