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

PropertyIsNilOperatorTests.propertyIsNil (HTTP POST) sends invalid request #25

Closed
JulienCharon opened this issue Mar 31, 2016 · 1 comment
Assignees
Labels

Comments

@JulienCharon
Copy link

Our WFS offers instances of 2 feature types. When running the test suite, the POST version of Basic WFS test Property Is Nil fails because it sends an invalid request:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" count="10" service="WFS" startIndex="0" version="2.0.0">
                <wfs:Query xmlns:ns73="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" typeNames="ns73:NamedPlace">
                               <Filter xmlns="http://www.opengis.net/fes/2.0">
                                               <PropertyIsNil>
                                                               <ValueReference xmlns:tns="urn:x-inspire:specification:gmlas:GeographicalNames:3.0">tns:type</ValueReference>
                                               </PropertyIsNil>
                               </Filter>
                               <Filter xmlns="http://www.opengis.net/fes/2.0">
                                               <PropertyIsNil>
                                                               <ValueReference xmlns:tns="urn:x-inspire:specification:gmlas:ProtectedSites:3.0">tns:siteProtectionClassification</ValueReference>
                                               </PropertyIsNil>
                               </Filter>
                </wfs:Query>
                <wfs:Query xmlns:ns5="urn:x-inspire:specification:gmlas:ProtectedSites:3.0" typeNames="ns5:ProtectedSite"/>
</wfs:GetFeature>

According to query schema, an AbstractAdhocQueryExpressionType can only contain a single AbstractSelectionClause (i.e. FIlter) or none at all. The one sent contains 2 of them.

Thus, the request must be:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" count="10" service="WFS" startIndex="0" version="2.0.0">
                <wfs:Query xmlns:ns73="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" typeNames="ns73:NamedPlace">
                               <Filter xmlns="http://www.opengis.net/fes/2.0">
                                               <PropertyIsNil>
                                                               <ValueReference xmlns:tns="urn:x-inspire:specification:gmlas:GeographicalNames:3.0">tns:type</ValueReference>
                                               </PropertyIsNil>
                               </Filter>                             
                </wfs:Query>
                <wfs:Query xmlns:ns5="urn:x-inspire:specification:gmlas:ProtectedSites:3.0" typeNames="ns5:ProtectedSite">
                               <Filter xmlns="http://www.opengis.net/fes/2.0">
                                               <PropertyIsNil>
                                                               <ValueReference xmlns:tns="urn:x-inspire:specification:gmlas:ProtectedSites:3.0">tns:siteProtectionClassification</ValueReference>
                                               </PropertyIsNil>
                               </Filter>              
                </wfs:Query>
</wfs:GetFeature>
@rjmartell
Copy link
Contributor

The propertyIsNil test (in PropertyIsNilOperatorTests) iterates through nillable properties found in the app schema. However, the request entity is not being reset between requests so all requests after the first one are “polluted” with previous queries.

@rjmartell rjmartell added the bug label Mar 31, 2016
@rjmartell rjmartell self-assigned this Mar 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants