3

Is there a way to create a stored query from this WFS 2.0.0 service that filters exactly an nested element?

http://geoportal.ancpi.ro/arcgis/rest/services/AU/AU_Download/GeoDataServer/exts/InspireFeatureDownload/service?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&STOREDQUERY_ID=GETauByNationalCode&code=11940

This is an extract of the GML:

<au:AdministrativeUnit gml:id="auAdmUnitS.1387">
   <au:nationalCode>11940</au:nationalCode>
   <au:inspireId>
     <base:Identifier>
      <base:localId>1.29.11940</base:localId>
      <base:namespace>RO.Ancpi.AU</base:namespace>
      <base:versionId xsi:nil="true"/>
     </base:Identifier>
    </au:inspireId>
</au:AdministrativeUnit>

I would ideally like to be able to filter the data based on these two properties

  • au:InspireId/base:Identifier/base:namespace

  • au:InspireId/base:Identifier/base:localId

To do this I created a stored query with the following definition:

<DescribeStoredQueriesResponse xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://geoportal.ancpi.ro/arcgis/rest/directories/arcgisforinspire/schema/ogc/wfs/2.0/wfs.xsd">
    <wfs:StoredQueryDescription id="GetSQ2">
        <Title>GetSQ2</Title>
        <wfs:QueryExpressionText language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" returnFeatureTypes="gml:AbstractFeature">
            <wfs:Query typeNames="au:AdministrativeUnit">
                <fes:Filter>
                    <fes:And>
                        <fes:PropertyIsEqualTo>
                            <fes:ValueReference>au:inspireId/base:Identifier/base:localId</fes:ValueReference>
                            <fes:Literal>1.29.11940</fes:Literal>
                        </fes:PropertyIsEqualTo>
                        <fes:PropertyIsEqualTo>
                            <fes:ValueReference>au:inspireId/base:Identifier/base:namespace</fes:ValueReference>
                            <fes:Literal>RO.Ancpi.AU</fes:Literal>
                        </fes:PropertyIsEqualTo>
                    </fes:And>
                </fes:Filter>
            </wfs:Query>
        </wfs:QueryExpressionText>
    </wfs:StoredQueryDescription>
</DescribeStoredQueriesResponse>

When I create a GetFeature Request using this Stored Query: http://geoportal.ancpi.ro/arcgis/rest/services/AU/AU_Download/GeoDataServer/exts/InspireFeatureDownload/service?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&STOREDQUERY_ID=GetSQ2

I get this error message: Operation request contains an invalid parameter value. The PropertyName "au:inspireId/base:Identifier/base:localId" is in step "basex:Identifier" not compliant with the Application schema.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.