Hi all!

To provide some more information on this issue, here are my findings since
my last email.
Parameter namespaces produce some unexpected behavior.
(1)
https://myserver.com/geoserver/am1/ows?service=WFS&version=2.0.0&request=GetFeature&count=25&typenames=am1:AM.RiverBasinDistrict
    - This is a normal way of accessing features in workspace am1, named
AM.RiverBasinDistrict - yields response as expected

(2)
https://myserver.com/geoserver/am1/ows?service=WFS&version=2.0.0&request=GetFeature&count=25&typenames=somethingRandom:AM.RiverBasinDistrict

    - This request yields expected response although workspace/namespace
prefix in typeNames is non existent (should be am1)

(3)
https://myserver.com/geoserver/am1/ows?service=WFS&version=2.0.0&request=GetFeature&count=25&typenames=am1:AM.RiverBasinDistrict&namespaces=xmlns(am1,http://inspire.ec.europa.eu/schemas/am/4.0)
    - This request adds namespaces parameter and yields expected response

(4)
https://myserver.com/geoserver/am1/ows?service=WFS&version=2.0.0&request=GetFeature&count=25&typenames=am1:AM.RiverBasinDistrict&namespaces=xmlns(somethingRandom,http://inspire.ec.europa.eu/schemas/am/4.0)
    - Same as (3) but in namespaces parameter ns is changed to
'somethingRandom', still yields same response as (3). If the ns uri is
changed to a non-existent path it still yields the same response.

(5)
https://myserver.com/geoserver/am1/ows?service=WFS&version=2.0.0&request=GetFeature&count=25&typenames=somethingRandom:AM.RiverBasinDistrict&namespaces=xmlns(somethingRandom,http://inspire.ec.europa.eu/schemas/am/4.0)
   - Return an error message stating:
<ows:Exception exceptionCode="InvalidParameterValue" locator="namespace">
<ows:ExceptionText>Unknown namespace []</ows:ExceptionText>
- Why is locator namespace instead of namespaces?

If i try a request with namespaces parameter set completely wrong e.g.:
https://myserver.com/geoserver/am1/ows?service=WFS&version=2.0.0&request=GetFeature&count=25&typenames=somethingRandom:AM.RiverBasinDistrict&namespaces=xmlns(,)
This yields an error saying:
<ows:Exception exceptionCode="InvalidParameterValue" locator="namespaces">
<ows:ExceptionText>Illegal namespace declaration, should be of the form
prefix,&lt;namespace uri&gt;: ,</ows:ExceptionText>
   - Notice that locator now says namespaces and expects format
xmlns(<prefix>,<ns uri>)

Not that important but this request seems to be handled wrong also:

https://myserver.com/geoserver/am1/ows?service=WFS&version=2.0.0&request=GetFeature&count=25&typenames=somethingRandom:AM.RiverBasinDistrict&namespaces=xmlns,xmlns(somethingRandom,http://inspire.ec.europa.eu/schemas/am/4.0)
   - This yields error saying:
 <ows:Exception exceptionCode="InvalidParameterValue" locator="namespaces">
<ows:ExceptionText>Illegal namespace declaration, should be of the form
xmlns(&lt;prefix&gt;=&lt;ns uri&gt;): xmlns</ows:ExceptionText>
   - Locator is namespaces, but expected format is xmlns(<prefix> = <ns
uri>). This formatting was used pre WFS 2.0.0. What is also confusing is
that the pre WFS 2.0.0 namespaces parameter was indeed named namespace
(similar to change from typeName to typeNames).

This seems like a bug to me, but I would like to hear someone else's
opinion on the issue.

Thank you all in advance!

Sincerely,
Luka



sri, 15. pro 2021. u 14:08 Luka Stemberga <stemberga.l...@gmail.com>
napisao je:

> Hi All
>
> I'm trying to validate my INSPIRE download service (WFS) configured on
> GeoServer. One of the first test that validator reports as failed is:
>
> WFS 2.0 Conformance Test Suite -->
> org.opengis.cite.iso19142.SuitePreconditions --> dataAreAvailable, which
> returns an error saying:
>
>     - OGC TEAM Engine reported a failed test: Prerequisite not satisfied:
> No valid data available from WFS.
>
> I was a bit intrigued by this error so I tried to catch requests sent from
> INSPIRE validator to GeoServer through the monitor plugin to determine what
> raises this error. That is when an error caught my eye.
>
> One of the first GET requests from validator is:
>
>
> https://myserver.com/geoserver/am1/wfs?service=WFS&version=2.0.0&request=GetFeature&count=25&typenames=ns83:AM.RiverBasinDistrict&namespaces=xmlns(xml,http://www.w3.org/XML/1998/namespace),xmlns(ns83,http://inspire.ec.europa.eu/schemas/am/4.0),xmlns(wfs,http://www.opengis.net/wfs/2.0)
>
> Which fails with response:
>
> <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
> https://myserver.com/geoserver/schemas/ows/1.1.0/owsAll.xsd";>
> <ows:Exception exceptionCode="InvalidParameterValue" locator="namespace">
> <ows:ExceptionText>Unknown namespace []</ows:ExceptionText>
> </ows:Exception>
> </ows:ExceptionReport>
>
> On the other hand if I change namespace*s *parameter into namespace
> (notice the missing s) in GET request, the request yields an expected
> response. Searching the web I found that prior to WFS 2.0.0 version, the
> expected parameter was indeed namespace, and was changed to namespace*s *for
> versions 2.0.0+.
>
> So GET request that is currently OK by geoserver (v2.20) is:
>
>
> https://myserver.com/geoserver/am1/wfs?service=WFS&version=2.0.0&request=GetFeature&count=25&typenames=ns83:AM.RiverBasinDistrict&namespace=xmlns(xml,http://www.w3.org/XML/1998/namespace),xmlns(ns83,http://inspire.ec.europa.eu/schemas/am/4.0),xmlns(wfs,http://www.opengis.net/wfs/2.0)
>
> Has anyone experienced the same issue, and could this be a potential bug,
> or is this a server configuration issue?
>
> I'am not entirely sure that this is the exact reason for the failed
> validation test, but it is certainly unexpected behavior.
>
> Thank you very much for your answers in advance!
>
> Sincerely,
>
> Luka
>
_______________________________________________
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