Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test replacementVersionHasNoSuccessor (Feature versions) sets wrong attribute value for gml:id in filter expression #53

Closed
dstenger opened this issue Oct 17, 2016 · 2 comments
Assignees

Comments

@dstenger
Copy link
Contributor

dstenger commented Oct 17, 2016

Test replacementVersionHasNoSuccessor randomly selects a feature and replaces it with a new feature (replace request).
When the new feature is generated the attribute gml:id is set to "id-CURRENTTIMESTAMP".
Then, the replace statement is created using a filter expression with the previously generated gml:id.

Of course, a feaure with the gml:id containing a timestamp does not exist.
Instead, the original gml:id (without timestamp) should be used for the filter expression of the replace request.

@dstenger dstenger changed the title Test replacementVersionHasNoSuccessor (Feature versions) sets wrong attribute value for gml:id Test replacementVersionHasNoSuccessor (Feature versions) sets wrong attribute value for gml:id in filter expression Oct 17, 2016
@rjmartell
Copy link
Contributor

rjmartell commented Oct 17, 2016

The first transaction request sets a dummy feature id and the server reports the assigned id in the response; this server-generated id (@Rid) is then extracted and included in the subsequent query to fetch the NEXT version, which shouldn't exist because the given id should correspond to the LATEST version.

Is this not the case? What error message is produced?

@lgoltz
Copy link
Contributor

lgoltz commented Oct 18, 2016

The problem is that the feature id was set to a dummy id. This is not expected as the gml:id cannot be altered except by an insert request (see F.4 Identifiers in WFS 2.0). Sure if feature versioning is enabled, a replace results in creating a new latest version (15.2.6 Replace action, WFS 2.0). But this is done by the server side, so that the client must not change the gml:id. The already existing replace-Tests in the Transaction CC also uses the original feature with the original feature id.

Setting the feature id to a dummy id causes an unexpected request, cause the the dummy id is used in the filter (and a feature with this id does not exist):

<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0"
    xmlns:gml="http://www.opengis.net/gml/3.2" service="WFS" version="2.0.0">
    <wfs:Replace>
        <app:osm_administrative xmlns:app="http://www.deegree.org/app"
            id="id-1476681835509">
            <gml:identifier codeSpace="http://cite.opengeospatial.org/">c4f4395f-9c77-40bd-a00e-99211b52e9ea</gml:identifier>
                         ...
        </app:osm_administrative>
        <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">
            <fes:ResourceId rid="id-1476681835509" />
        </fes:Filter>
    </wfs:Replace>
</wfs:Transaction>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants