Bug report #16173

QGIS WFS client not using urls from capabilities document

Added by Darren Carman about 7 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Web Services clients/WFS
Affected QGIS version:2.14.5 Regression?:No
Operating System:XUbuntu Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:24083

Description

The url I add for the WFS service works fine for getting the capabilities and is a proxy, e.g. http://www.originalurl.com/wfs?...

The capabilities sent back has different urls for each request type, e.g.
<ows:Operation name="DescribeFeatureType">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:type="simple" xlink:href="http://www.anotherurl.com/wfs?...&"/>
<ows:Post xlink:type="simple" xlink:href="http://www.anotherurl.com/wfs?...&"/>
</ows:HTTP>
</ows:DCP>
<ows:Parameter name="outputFormat">
<ows:Value>XMLSCHEMA</ows:Value>
<ows:Value>text/xml; subtype=gml/2.1.2</ows:Value>
<ows:Value>text/xml; subtype=gml/3.1.1</ows:Value>
</ows:Parameter>
</ows:Operation>

Unfortunately these urls appear to be being ignored and the original url is still being used for all following request types (DescribeFeatureType, GetFeature,etc).

What I want is for the GetCapabilities to go through the proxy and all other requests to go direct to the server direct. This should be possible if the urls in the capabilities document are used.

WMS works correctly using the urls supplied in the capabilities (GetFeatureInfo, GetMap, etc).

I am using QGIS 2.14.5-Essen 64bit on XUbuntu 16.10.

History

#1 Updated by Giovanni Manghi almost 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#2 Updated by Even Rouault over 6 years ago

  • Status changed from Open to Feedback
  • Description updated (diff)

Could you point to such a server ?

#3 Updated by Darren Carman over 6 years ago

For WFS try:
http://environment.data.gov.uk/ds/wfs?SERVICE=WFS&INTERFACE=ENVIRONMENTWFS&VERSION=2.0.0&LC=40000000

Running http://environment.data.gov.uk/ds/wfs?SERVICE=WFS&INTERFACE=ENVIRONMENTWFS&VERSION=2.0.0&LC=40000000&REQUEST=GetCapabilities in a browser you can hopefully see that different urls are shown for DescribeFeatureType, GetFeature, etc.

From our logs we can see that when using QGIS these urls are not used, instead the http://environment.data.gov.uk/ds/wfs url is always used.

For WMS (which works correctly) try:
http://environment.data.gov.uk/ds/wms?SERVICE=WMS&INTERFACE=ENVIRONMENT&LC=20000000

The urls returned in the capabilities document are used by QGIS for follow on calls (e.g. GetMap).

#4 Updated by Even Rouault almost 6 years ago

  • Resolution set to duplicate

Support for this has been added a few months ago per the following commit. I've verified this worked with the above mentionned endpoint

commit f1b59876344bf0c0f066c81bf8ef73ef25365023
Author: Alessandro Pasotti <>
Date: Wed Feb 21 15:25:21 2018 +0100

[bugfix] Support Distributed Computing Platform (DCP) for WFS
Implement the possibility to specify different endpoints
for different WFS operations.
With tests.
Fixes #18099 WFS Capabilities handling problem

#5 Updated by Even Rouault almost 6 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF