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

NullPointerExceptions for several WFS tests #199

Closed
JohannaOtt opened this issue Apr 21, 2021 · 10 comments · Fixed by #215
Closed

NullPointerExceptions for several WFS tests #199

JohannaOtt opened this issue Apr 21, 2021 · 10 comments · Fixed by #215
Assignees
Milestone

Comments

@JohannaOtt
Copy link

When validating this WFS with the WFS test class, I get multiple NullPointerExpections, e.g. for Temporal Filter
grafik

This is the validation log:
s0003.zip

I originally reported this issue in the INSPIRE Validator GitHub repository, because I got validation error messages from the INSPIRE Validator that I did not understand. The assumption there is that the issue results from the Team Engine Validator, which actually seems to be the case as it is returning NullPointerExcpetions for this test case.

Could you please check why there are NullPointerExceptions and if they actually hint to validation issues or if it is an issue in the Team Engine Validator itself?

@dstenger
Copy link
Contributor

Thank you for reporting.

As this issue is related to the WFS 2.0 test suite, I transferred it to the corresponding issue tracker.

@dstenger dstenger transferred this issue from opengeospatial/teamengine Apr 21, 2021
@dstenger
Copy link
Contributor

Can you please re-run the test on the OGC CITE Beta environment (https://cite.opengeospatial.org/te2/)?
Your problem should be fixed there.
The version currently installed on Beta environment will most likely be moved to Production environment this summer.

@JohannaOtt
Copy link
Author

@dstenger Thank you for the hint. The behavior is different but still not right in my opinion. The tests fail with these messages
grafik

The same occurred in the INSPIRE Validator. I don't think they are correct. The data values provided in the data are correct.

@JohannaOtt JohannaOtt removed their assignment Apr 21, 2021
@dstenger dstenger self-assigned this Apr 26, 2021
@lgoltz
Copy link
Contributor

lgoltz commented May 5, 2021

The WFS provides two feature types: SpatialPlan and OfficialDocumentation. The feature type OfficialDocumentation has no temporal property, so it is fine that these tests are skipped.
The feature type SpatialPlan has the property validFrom. The service provides exactly one feature with the following value:

<plu:validFrom>2012-04-04</plu:validFrom>

The "after Instant" test request all features after 2012-04-04T11:39:59.999Z.

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" count="10" service="WFS" version="2.0.0">
  <wfs:Query
          typeNames="ns5:SpatialPlan">
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">
      <fes:After>
        <fes:ValueReference xmlns:tns="http://inspire.ec.europa.eu/schemas/plu/4.0">tns:validFrom</fes:ValueReference>
        <gml:TimeInstant xmlns:gml="http://www.opengis.net/gml/3.2" frame="http://www.iso.org/iso/iso8601" gml:id="T01">
          <gml:timePosition>2012-04-04T11:39:59.999Z</gml:timePosition>
        </gml:TimeInstant>
      </fes:After>
    </fes:Filter>
  </wfs:Query>
</wfs:GetFeature>

The result is an empty feature collection.

@dstenger
Copy link
Contributor

@JohannaOtt
The tests are not failing but they are skipped because the target feature type does not have temporal properties.
Please check the analysis of @lgoltz: #199 (comment)
Does this clarify your question?

@JohannaOtt
Copy link
Author

I do understand they are skipped for the types that do not contain temporal properties.

I do not understand why the empty feature collection is assessed being an error if there are no features after the one the request uses
grafik

In my opinion, the data is not wrong, so the test should not fail. But maybe I misunderstood the analysis and the data acutally is wrong?

@dstenger
Copy link
Contributor

I agree that in your special case (one feature) the test suite might be improved.
We will do further investigation.

@dstenger
Copy link
Contributor

Findings of analysis:

Test suite is sending following request: https://geodienste.komm.one/ows/services/org.506.78427a5b-2f82-4311-ba7d-74eb7b8c10f4_wfs/org.506.e21f771b-0d06-4dbc-b246-60aa8d12ed52?service=WFS&version=2.0.0&request=GetFeature&count=10&typenames=ns58:SpatialPlan&namespaces=xmlns(xml,http://www.w3.org/XML/1998/namespace),xmlns(ns58,http://inspire.ec.europa.eu/schemas/plu/4.0),xmlns(wfs,http://www.opengis.net/wfs/2.0)&filter=<fes:Filter xmlns:ns58="http://inspire.ec.europa.eu/schemas/plu/4.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0"><fes:During><fes:ValueReference xmlns:tns="http://inspire.ec.europa.eu/schemas/plu/4.0">tns:validFrom</fes:ValueReference><gml:TimePeriod xmlns:gml="http://www.opengis.net/gml/3.2" frame="http://www.iso.org/iso/iso8601" gml:id="TP01"><gml:beginPosition>2012-04-04T03:00:00Z</gml:beginPosition><gml:endPosition>2012-04-05T04:59:59.999Z</gml:endPosition></gml:TimePeriod></fes:During></fes:Filter>

It returns an empty feature collection.

However, if the time window of beginPosition and endPosition is changed, a feature is returned.
E.g.: <gml:beginPosition>2012-04-04</gml:beginPosition><gml:endPosition>2012-04-05</gml:endPosition>

So, it must be investigated how the ETS decides what beginPosition and endPosition are.

@dstenger
Copy link
Contributor

Problem is probably related to the time zones where the service and TEAM Engine are located.

Possible solution: Time range generated by TEAM Engine is increased by adding one day to the endPosition and subtracting one day from the beginPosition. Solution will be checked by CITE TEAM.

@dstenger dstenger assigned bpross-52n and unassigned dstenger Oct 18, 2021
bpross-52n added a commit that referenced this issue Dec 8, 2021
(cherry picked from commit 9bc254278cfc6e60e4edb5fcb0fb509b2d7f4cd9)
bpross-52n added a commit that referenced this issue Dec 8, 2021
(cherry picked from commit 9bc254278cfc6e60e4edb5fcb0fb509b2d7f4cd9)
(cherry picked from commit f56525c)
@bpross-52n bpross-52n linked a pull request Dec 9, 2021 that will close this issue
@robblis
Copy link

robblis commented May 25, 2022

Hi @dstenger

Wanted to add some more information that I'm still observing which was posted in issue #185 .

Testing the Direct WFS for the Sea Regions theme, I'm seeing generated in the "before Period" test the following GET request.

https://inspiredemo.esri.com/arcgis/rest/services/sr_test/MapServer/exts/InspireFeatureDownload/service?service=WFS&version=2.0.0&request=GetFeature&count=10&typenames=ns91:Sea&namespaces=xmlns(xml,http://www.w3.org/XML/1998/namespace),xmlns(ns91,http://inspire.ec.europa.eu/schemas/sr/4.0),xmlns(wfs,http://www.opengis.net/wfs/2.0)&filter=<fes:Filter xmlns:ns91="http://inspire.ec.europa.eu/schemas/sr/4.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0">fes:Before<fes:ValueReference xmlns:tns="http://inspire.ec.europa.eu/schemas/sr/4.0">tns:beginLifespanVersion</fes:ValueReference><gml:TimePeriod xmlns:gml="http://www.opengis.net/gml/3.2" frame="http://www.iso.org/iso/iso8601" gml:id="TP01">gml:beginPosition2017-07-12T17:40:00Z</gml:beginPosition>gml:endPosition2017-07-12T18:20:00Z</gml:endPosition></gml:TimePeriod></fes:Before></fes:Filter>

If I remove the "Z" zulu reference in the DateTime value, the request returns a record.

https://inspiredemo.esri.com/arcgis/rest/services/sr_test/MapServer/exts/InspireFeatureDownload/service?service=WFS&version=2.0.0&request=GetFeature&count=10&typenames=ns91:Sea&namespaces=xmlns(xml,http://www.w3.org/XML/1998/namespace),xmlns(ns91,http://inspire.ec.europa.eu/schemas/sr/4.0),xmlns(wfs,http://www.opengis.net/wfs/2.0)&filter=<fes:Filter xmlns:ns91="http://inspire.ec.europa.eu/schemas/sr/4.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0">fes:Before<fes:ValueReference xmlns:tns="http://inspire.ec.europa.eu/schemas/sr/4.0">tns:beginLifespanVersion</fes:ValueReference><gml:TimePeriod xmlns:gml="http://www.opengis.net/gml/3.2" frame="http://www.iso.org/iso/iso8601" gml:id="TP01">gml:beginPosition2017-07-12T17:40:00</gml:beginPosition>gml:endPosition2017-07-12T18:20:00</gml:endPosition></gml:TimePeriod></fes:Before></fes:Filter>

So it seems like the URL request generation from the validator is expecting all DateTime values to be in a Zulu format, which in our case, we can't do because the data for our services are in the local time zone of the server the service is running. on. I've attached the test log file.

Please let me know if you have any questions. We'll try to keep this service running so you can test.

Thanks,
Robert

DirectWFS_Sea_Regions_s0036.zip

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

Successfully merging a pull request may close this issue.

5 participants