@@ -419,7 +419,7 @@ bool QgsWFSProvider::processSQL( const QString &sqlString, QString &errorMsg, QS
419
419
concatenatedTypenames += typeName;
420
420
}
421
421
422
- QgsWFSDescribeFeatureType describeFeatureType ( mShared ->mURI . uri () );
422
+ QgsWFSDescribeFeatureType describeFeatureType ( mShared ->mURI );
423
423
if ( !describeFeatureType.requestFeatureType ( mShared ->mWFSVersion ,
424
424
concatenatedTypenames ) )
425
425
{
@@ -1168,7 +1168,7 @@ bool QgsWFSProvider::describeFeatureType( QString &geometryAttribute,
1168
1168
{
1169
1169
fields.clear ();
1170
1170
1171
- QgsWFSDescribeFeatureType describeFeatureType ( mShared ->mURI . uri () );
1171
+ QgsWFSDescribeFeatureType describeFeatureType ( mShared ->mURI );
1172
1172
if ( !describeFeatureType.requestFeatureType ( mShared ->mWFSVersion ,
1173
1173
mShared ->mURI .typeName (), forceSingularTypeNames ) )
1174
1174
{
@@ -1450,7 +1450,7 @@ bool QgsWFSProvider::sendTransactionDocument( const QDomDocument &doc, QDomDocum
1450
1450
return false ;
1451
1451
}
1452
1452
1453
- QgsWFSTransactionRequest request ( mShared ->mURI . uri () );
1453
+ QgsWFSTransactionRequest request ( mShared ->mURI );
1454
1454
return request.send ( doc, serverResponse );
1455
1455
}
1456
1456
@@ -1464,11 +1464,13 @@ QDomElement QgsWFSProvider::createTransactionElement( QDomDocument &doc ) const
1464
1464
transactionElem.setAttribute ( QStringLiteral ( " service" ), QStringLiteral ( " WFS" ) );
1465
1465
transactionElem.setAttribute ( QStringLiteral ( " xmlns:xsi" ), QStringLiteral ( " http://www.w3.org/2001/XMLSchema-instance" ) );
1466
1466
1467
- QUrl describeFeatureTypeURL ( mShared ->mURI .baseURL ( ) );
1467
+ QUrl describeFeatureTypeURL = mShared ->mURI .requestUrl ( QStringLiteral ( " DescribeFeatureType " ) );
1468
1468
// For tests (since the URL contains part of random data, we need to replace it with a fixed content)
1469
- if ( mShared ->mURI .baseURL ().toString ().contains ( QLatin1String ( " fake_qgis_http_endpoint" ) ) )
1469
+ if ( describeFeatureTypeURL.toString ().contains ( QLatin1String ( " fake_qgis_http_endpoint" ) ) )
1470
+ {
1470
1471
describeFeatureTypeURL = QUrl ( QStringLiteral ( " http://fake_qgis_http_endpoint" ) );
1471
- describeFeatureTypeURL.addQueryItem ( QStringLiteral ( " REQUEST" ), QStringLiteral ( " DescribeFeatureType" ) );
1472
+ describeFeatureTypeURL.addQueryItem ( QStringLiteral ( " REQUEST" ), QStringLiteral ( " DescribeFeatureType" ) );
1473
+ }
1472
1474
describeFeatureTypeURL.addQueryItem ( QStringLiteral ( " VERSION" ), QStringLiteral ( " 1.0.0" ) );
1473
1475
// TODO: proper support of 2.0.0, for now hardcoded
1474
1476
describeFeatureTypeURL.addQueryItem ( QgsWFSUtils::typeNameParameterForVersion ( WfsVersion ).toUpper (), mShared ->mURI .typeName () );
@@ -1562,6 +1564,8 @@ bool QgsWFSProvider::getCapabilities()
1562
1564
1563
1565
const QgsWfsCapabilities::Capabilities caps = getCapabilities.capabilities ();
1564
1566
mShared ->mCaps = caps;
1567
+ mShared ->mURI .setGetEndpoints ( caps.operationGetEndpoints );
1568
+ mShared ->mURI .setPostEndpoints ( caps.operationPostEndpoints );
1565
1569
}
1566
1570
1567
1571
mShared ->mWFSVersion = mShared ->mCaps .version ;
0 commit comments