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.
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
Yet... it does seem to work (at least for my use case), after I applied this fix. Was I just lucky?
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.
Mass closing all resolved issues not modified in the last 4 weeks