Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #7461 from pblottiere/server_wfs_post
[server] Fixes Post element in WFS GetCapabilities doc
  • Loading branch information
pblottiere committed Jul 24, 2018
2 parents 10a66da + 8b14a5b commit 1a94727
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/server/services/wfs/qgswfsgetcapabilities.cpp
Expand Up @@ -331,11 +331,13 @@ namespace QgsWfs
QDomElement dcpElement = doc.createElement( QStringLiteral( "ows:DCP" ) );
QDomElement httpElement = doc.createElement( QStringLiteral( "ows:HTTP" ) );
QDomElement getElement = doc.createElement( QStringLiteral( "ows:Get" ) );
getElement.setAttribute( QStringLiteral( "xlink:type" ), QStringLiteral( "xlink:simple" ) );
getElement.setAttribute( QStringLiteral( "xlink:href" ), hrefString );
QDomElement postElement = getElement.cloneNode().toElement();
httpElement.appendChild( getElement );

QDomElement postElement = doc.createElement( QStringLiteral( "ows:Post" ) );
postElement.setAttribute( QStringLiteral( "xlink:href" ), hrefString );
httpElement.appendChild( postElement );

dcpElement.appendChild( httpElement );
operationElement.appendChild( dcpElement );

Expand Down
16 changes: 8 additions & 8 deletions tests/testdata/qgis_server/wfs_getcapabilities.txt
Expand Up @@ -20,8 +20,8 @@ Content-Type: text/xml; charset=utf-8
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Post xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
</ows:HTTP>
</ows:DCP>
<ows:Parameter name="service">
Expand All @@ -38,8 +38,8 @@ Content-Type: text/xml; charset=utf-8
<ows:Operation name="DescribeFeatureType">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Post xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
</ows:HTTP>
</ows:DCP>
<ows:Parameter name="outputFormat">
Expand All @@ -51,8 +51,8 @@ Content-Type: text/xml; charset=utf-8
<ows:Operation name="GetFeature">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Post xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
</ows:HTTP>
</ows:DCP>
<ows:Parameter name="outputFormat">
Expand All @@ -68,8 +68,8 @@ Content-Type: text/xml; charset=utf-8
<ows:Operation name="Transaction">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Post xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
</ows:HTTP>
</ows:DCP>
<ows:Parameter name="inputFormat">
Expand Down

0 comments on commit 1a94727

Please sign in to comment.