Skip to content

Commit

Permalink
Fix Operations element
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Sep 18, 2018
1 parent e005d6e commit dea3b75
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/server/services/wfs/qgswfsgetcapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,13 @@ namespace QgsWfs
QDomElement operationsElement = doc.createElement( QStringLiteral( "Operations" )/*wfs:Operations*/ );
featureTypeListElement.appendChild( operationsElement );
//wfs:Query element
QDomElement queryElement = doc.createElement( QStringLiteral( "Query" )/*wfs:Query*/ );
operationsElement.appendChild( queryElement );
QDomElement operationElement = doc.createElement( QStringLiteral( "Operation" ) );
QDomText queryText = doc.createTextNode( "Query" );
operationElement.appendChild( queryText );
operationsElement.appendChild( operationElement );

// QDomElement queryElement = doc.createElement( QStringLiteral( "Query" )/*wfs:Query*/ );
// operationsElement.appendChild( queryElement );

const QStringList wfsLayerIds = QgsServerProjectUtils::wfsLayerIds( *project );
const QStringList wfstUpdateLayersId = QgsServerProjectUtils::wfstUpdateLayerIds( *project );
Expand Down Expand Up @@ -575,8 +580,12 @@ namespace QgsWfs
//wfs:Operations element
QDomElement operationsElement = doc.createElement( QStringLiteral( "Operations" )/*wfs:Operations*/ );
//wfs:Query element
QDomElement queryElement = doc.createElement( QStringLiteral( "Query" )/*wfs:Query*/ );
operationsElement.appendChild( queryElement );
// QDomElement queryElement = doc.createElement( QStringLiteral( "Query" )/*wfs:Query*/ );
// operationsElement.appendChild( queryElement );
QDomElement operationElement = doc.createElement( QStringLiteral( "Operation" ) );
QDomText queryText = doc.createTextNode( "Query" );
operationElement.appendChild( queryText );
operationsElement.appendChild( operationElement );
if ( wfstUpdateLayersId.contains( layer->id() ) ||
wfstInsertLayersId.contains( layer->id() ) ||
wfstDeleteLayersId.contains( layer->id() ) )
Expand Down

0 comments on commit dea3b75

Please sign in to comment.