I have upgraded Geoserver to v.2.14, because of this bug:

https://osgeo-org.atlassian.net/browse/GEOS-8635

This leads me to another problem. So the capabilites request:

http://myserver/geoserver/gn/wfs?service=WFS&version=2.0.0&request=getcapabilities

has declared prefix gn:

xmlns:gn="http://inspire.ec.europa.eu/schemas/gn/4.0";

But describestoredqueries

http://myserver/geoserver/gn/wfs?service=WFS&version=2.0.0&request=describestoredqueries&STOREDQUERY_ID=http://inspire.ec.europa.eu/operation/download/GetSpatialDataset


does not, so I get an error from INSPIRE validator:

org.xml.sax.SAXException: Fatal error: org.xml.sax.SAXParseException;
lineNumber: 14; columnNumber: 151; UndeclaredPrefix: Cannot resolve
'gn:NamedPlace' as a QName: the prefix 'gn' is not declared. Response did
not validate against schema 'http://www.opengis.net/wfs/2.0
http://myserver:80/geoserver/schemas/wfs/2.0/wfs.xsd'.

As I have noticed that gn prefix is missing after CreateStoredQuery POST, i
added it manually in data_dir/wfs/query/querydefinition.xml, but the result
is the same. XML header does not contain gn prefix. Am I missing something
here or this could possibly be a Bug?

Best regards
Davor

uto, 30. lis 2018. u 07:56 Davor Racic <davor.ra...@gmail.com> napisao je:

> Hi,
>
> just tried POST-ing with returnFeatureTypes="" and it worked. xmlns:gn="
> http://inspire.ec.europa.eu/schemas/gn/4.0"; is stripped from query
> definition in data dir.
>
> Best regards
> Davor
>
> pon, 29. lis 2018. u 20:35 Davor Racic <davor.ra...@gmail.com> napisao je:
>
>> Just an explanation where I started. I created the query definition
>> manually to datadir/wfs/query, and eventually succeeded with that:
>>
>> <wfs:DescribeStoredQueriesResponse xmlns:xs="
>> http://www.w3.org/2001/XMLSchema";
>> xmlns:fes="http://www.opengis.net/fes/2.0";
>> xmlns:wfs="http://www.opengis.net/wfs/2.0";
>> xmlns:gml="http://www.opengis.net/gml/3.2";
>> xmlns:ows="http://www.opengis.net/ows/1.1";
>> xmlns:xlink="http://www.w3.org/1999/xlink";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=
>> "http://www.opengis.net/wfs/2.0
>> http://myserver:80/geoserver/schemas/wfs/2.0/wfs.xsd";>
>> <wfs:StoredQueryDescription id=
>> "urn:ogc:def:query:OGC-WFS::GetFeatureById">
>> <wfs:Title xml:lang="en">Get feature by identifier</wfs:Title>
>> <wfs:Parameter name="ID" type="xs:string"/>
>> <wfs:QueryExpressionText isPrivate="true" language=
>> "urn:ogc:def:queryLanguage:OGC-WFS::WFSQueryExpression"
>> returnFeatureTypes=""/>
>> </wfs:StoredQueryDescription>
>> <wfs:StoredQueryDescription id="
>> http://inspire.ec.europa.eu/operation/download/GetSpatialDataSet";>
>> <wfs:Title xml:lang="en">INSPIRE GetSpatialDataSet</wfs:Title>
>> <wfs:Abstract xml:lang="en">
>> INSPIRE GetSpatialDataSet 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 isPrivate="false" language=
>> "urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
>> returnFeatureTypes="gn:NamedPlace">
>> <wfs:Query wfs:srsName="${CRS}" wfs:typeNames="gn:NamedPlace">
>> <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:StoredQueryDescription>
>> </wfs:DescribeStoredQueriesResponse>
>>
>> But when I try to use it with the id "
>> http://inspire.ec.europa.eu/operation/download/GetSpatialDataSet";, I get:
>>
>> <ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema";
>> xmlns:ows="http://www.opengis.net/ows/1.1";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.0.0"
>> xsi:schemaLocation="http://www.opengis.net/ows/1.1
>> http://myserver:80/geoserver/schemas/ows/1.1.0/owsAll.xsd";>
>> <ows:Exception exceptionCode="InvalidParameterValue" locator=
>> "STOREDQUERY_ID">
>> <ows:ExceptionText>
>> No such stored query:
>> http://inspire.ec.europa.eu/operation/download/GetSpatialDataSet
>> </ows:ExceptionText>
>> </ows:Exception>
>> </ows:ExceptionReport>
>>
>> So I tried with CreateStoredQuery to catch some errors on Geoserver, but
>> that one was the least expected.
>>
>> Best regards
>> Davor
>>
>> pon, 29. lis 2018. u 19:47 Davor Racic <davor.ra...@gmail.com> napisao
>> je:
>>
>>> Hi Andrea,
>>>
>>> I tried with that few minutes after posting:
>>>
>>> <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";
>>> xmlns:gn="http://inspire.ec.europa.eu/schemas/gn/4.0";
>>> 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";>
>>>
>>> But with no luck...
>>>
>>> pon, 29. lis 2018. u 18:59 Andrea Aime <andrea.a...@geo-solutions.it>
>>> napisao je:
>>>
>>>> Hi,
>>>> I don't see a namespace declaration for gn in the XML... a
>>>> xmlns:gn="..." one I mean, at the top of the request.
>>>> I don't know if that's causing the error, but it might be
>>>>
>>>> Cheers
>>>> Andrea
>>>>
>>>>
>>>> On Mon, Oct 29, 2018 at 6:43 PM dracic <davor.ra...@gmail.com> wrote:
>>>>
>>>>> 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
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Regards, Andrea Aime == GeoServer Professional Services from the
>>>> experts! Visit http://goo.gl/it488V for more information. == Ing.
>>>> Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di
>>>> Montramito 3/A 55054 Massarosa
>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A%0D%0A55054++Massarosa&entry=gmail&source=g>
>>>> (LU) phone: +39 0584 962313 <+39%200584%20962313> fax: +39 0584 1660272
>>>> <+39%200584%20166%200272> mob: +39 339 8844549 <+39%20339%20884%204549>
>>>> http://www.geo-solutions.it http://twitter.com/geosolutions_it
>>>> ------------------------------------------------------- *Con
>>>> riferimento alla normativa sul trattamento dei dati personali (Reg. UE
>>>> 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
>>>> precisa che ogni circostanza inerente alla presente email (il suo
>>>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>>>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>>>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>>>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>>>> This email is intended only for the person or entity to which it is
>>>> addressed and may contain information that is privileged, confidential or
>>>> otherwise protected from disclosure. We remind that - as provided by
>>>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
>>>> e-mail or the information herein by anyone other than the intended
>>>> recipient is prohibited. If you have received this email by mistake, please
>>>> notify us immediately by telephone or e-mail.*
>>>>
>>>
_______________________________________________
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