AnsweredAssumed Answered

StoredQueries GetFeatureById

Question asked by aleho123 on Feb 8, 2017
Latest reply on Feb 16, 2017 by aleho123

To define a stored query you have to create a XML file with the query definition. An example from ESRI looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<wfs:StoredQueryList  xmlns:ogc="" 
xmlns:wfs=""  xmlns:fes="" 
service="WFS"  version="2.0.0">
  <wfs:StoredQueryDefinition id="urn:ogc:def:query:OGC-WFS::GetFeatureById">   
    <wfs:Title>urn:ogc:def:query:OGC-WFS::GetFeatureById predefined stored query</wfs:Title>   
    <wfs:Abstract>This query support all layers in the map</wfs:Abstract>   
    <wfs:QueryExpressionText returnFeatureTypes="myns:Cities,myns:Continent,myns:World"   
    language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="false">     
    <wfs:Query typeName="myns:Cities">       

The disadvantage of this is, that you have to define it for each and every typeName - everytime a new type is added, you have to add it to the Query. I would like to have a typename="*" or typename="?" - I want to remove the typename. Is this possible?

If not - I still have to add the typename or featureId parameter from the GetFeature request (even so i added the StoredQuery_id=...) otherwise there is an exception. Here is the request:


...- server - name - usw.... /WFSServer?service=WFS&REQUEST=GetFeature&STOREDQUERY_ID=urn:ogc:def:query:OGC-WFS::GetFeatureById&ID=52&typename=layer_name


Is there any possiblity to use this layer_name in the typename in the wfs:Query?