Stored Queries don't work on App-Schema layers backed by database

Description

The issue can be reproduced using the same setup as FeatureGML32Test (gs-app-schema-test module), but the backing datastore must be a database (I'm testing on PostGIS).

Create the following stored query:

The StoredQuery is created correctly, but the following GetFeature request returns nothing:

The same query returns one result if used on its own (i.e. without encapsulating it in a StoredQuery).
Apparently, the issue has to do with the XPath expression not being resolved properly, due to missing namespace definitions in the XML parser's context.

Environment

None

Activity

Show:
Ben Caradoc-Davies
November 10, 2015, 5:58 PM

WFS 2.0.0 support in app-schema is incomplete. The lack of support for stored queries is not yet documented but perhaps should be:
http://docs.geoserver.org/latest/en/user/data/app-schema/supported-gml-versions.html#gml-3-2-1

Stefano Costa
November 10, 2015, 6:08 PM

Yet... it does seem to work (at least for my use case), after I applied this fix. Was I just lucky?

Ben Caradoc-Davies
November 10, 2015, 7:00 PM

Nice. I did not say it would not work, just that it was not supported, which is not the same thing.

Most of app-schema was implemented well before WFS 2.0.0 support was added to GeoServer. Once a feature has enough unit test coverage, we can support it.

Kind regards,
Ben.

Stefano Costa
November 22, 2015, 4:56 PM

Fixed by PR #1330, backported to 2.8.x and 2.7.x branches.

Andrea Aime
February 15, 2017, 11:48 AM

Mass closing all resolved issues not modified in the last 4 weeks

Fixed

Assignee

Stefano Costa

Reporter

Stefano Costa

Triage

None

Fix versions

Affects versions

Components

Priority

Medium