Hi guys,

I'm stuck at creating stored query via CreateStoredQuery request. So the XML
of a stored query definition is:

 <wfs:CreateStoredQuery service="WFS" version="2.0.0"
xmlns="http://www.opengis.net/wfs/2.0";
xmlns:wfs="http://www.opengis.net/wfs/2.0";
xmlns:gml="http://www.opengis.net/gml/3.2";
xmlns:fes="http://www.opengis.net/fes/2.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xlink="http://www.w3.org/1999/xlink";
xmlns:ows="http://www.opengis.net/ows/1.1";
xsi:schemaLocation="http://www.opengis.net/wfs/2.0
http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2
http://schemas.opengis.net/gml/3.2.1/gml.xsd";>
    <wfs:StoredQueryDefinition
id="http://inspire.ec.europa.eu/operation/download/GetSpatialDataset/";>
        <wfs:Title xml:lang="en">INSPIRE GetSpatialDataSet</wfs:Title>
        <wfs:Abstract xml:lang="en">INSPIRE predefined Spatial Data Set
query</wfs:Abstract>
        <wfs:Parameter name="DataSetIdCode" type="xs:string"/>
        <wfs:Parameter name="DataSetIdNameSpace" type="xs:string"/>
        <wfs:Parameter name="CRS" type="xs:string"/>
        <wfs:Parameter name="Language" type="xs:string"/>
        <wfs:QueryExpressionText returnFeatureTypes="gn:NamedPlace"
isPrivate="false"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression">
            <wfs:Query wfs:typeNames="gn:NamedPlace" wfs:srsName="${CRS}">
                <fes:Filter>
                    <fes:Or>
                        <fes:PropertyIsEqualTo>
                          
<fes:ValueReference>inspireID/base:Identifier/base:namespace</fes:ValueReference>
                            <fes:Function wfs:name="if_then_else">
                                <fes:Function wfs:name="strEndsWith">
                                   
<fes:Literal>${DataSetIdNameSpace}</fes:Literal>
                                    <fes:Literal>/</fes:Literal>
                                </fes:Function>
                               
<fes:Literal>${DataSetIdNameSpace}</fes:Literal>
                                <fes:Function wfs:name="Concatenate">
                                   
<fes:Literal>${DataSetIdNameSpace}</fes:Literal>
                                    <fes:Literal>/</fes:Literal>
                                </fes:Function>
                            </fes:Function>
                        </fes:PropertyIsEqualTo>
                        <fes:PropertyIsEqualTo>
                          
<fes:ValueReference>inspireID/base:Identifier/base:namespace</fes:ValueReference>
                            <fes:Function wfs:name="if_then_else">
                                <fes:Function wfs:name="strEndsWith">
                                   
<fes:Literal>${DataSetIdCode}</fes:Literal>
                                    <fes:Literal>/</fes:Literal>
                                </fes:Function>
                                <fes:Literal>${DataSetIdCode}</fes:Literal>
                                <fes:Function wfs:name="Concatenate">
                                   
<fes:Literal>${DataSetIdCode}</fes:Literal>
                                    <fes:Literal>/</fes:Literal>
                                </fes:Function>
                            </fes:Function>
                        </fes:PropertyIsEqualTo>
                    </fes:Or>
                </fes:Filter>
            </wfs:Query>
        </wfs:QueryExpressionText>
    </wfs:StoredQueryDefinition>
</wfs:CreateStoredQuery>

Geoserver 2.13 latest returns an error:

<ows:Exception exceptionCode="OperationProcessingFailed"
locator="CreateStoredQuery">
  <ows:ExceptionText>StoredQuery declares return feature type(s) not not
referenced in query definition: gn:NamedPlace
StoredQuery declares return feature type(s) not not referenced in query
definition: gn:NamedPlace</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

I thought wfs:typeNames="gn:NamedPlace" would do exactly what the error
complains about. Can anyone help me with this issue?

Best regards
Davor




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to