Skip to main content

I’m trying to read this wfs-service https://avoin.metsakeskus.fi/rajapinnat/v1/gridcell/wfs or alternatively https://avoin.metsakeskus.fi/rajapinnat/v1/gridcell/ows with FeatureReader and FME returns following error:

 

2024-09-11 10:32:43| 0.0| 0.0|ERROR |<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema=" xmlns:ows="http://www.opengis.net/ows=" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance=" version="1.0.0=" xsi:schemaLocation="http://www.opengis.net/ows https://avoin.metsakeskus.fi/rajapinnat/schemas/ows/1.0.0/owsExceptionReport.xsd=">

<ows:Exception exceptionCode="InvalidParameterValue=" locator="namespace=">

<ows:ExceptionText>Unknown namespace sv1]</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

2024-09-11 10:32:43| 0.0| 0.0|ERROR |Received error report: ExceptionReport

2024-09-11 10:32:43| 0.0| 0.0|ERROR |The XML Module halted on error, see the logfile for details

2024-09-11 10:32:43| 0.0| 0.0|ERROR |A fatal error has occurred. Check the logfile above for details

2024-09-11 10:32:43| 0.0| 0.0|ERROR |<WFS> An error occurred while reading a GetFeature response, to ignore the error and avoid losing the previously read features, set the WFS "Ignore GetFeature Error" parameter. Total features downloaded: '0'

2024-09-11 10:32:43| 0.0| 0.0|ERROR |A fatal error has occurred. Check the logfile above for details

2024-09-11 10:32:43| 0.0| 0.0|ERROR |A fatal error has occurred. Check the logfile above for details

2024-09-11 10:32:43| 0.0| 0.0|FATAL |The below feature caused the translation to be terminated

2024-09-11 10:32:43| 0.0| 0.0|ERROR |FeatureReader_<Rejected> (TeeFactory): FeatureReader_<Rejected>: Termination Message: 'FeatureReader output a <Rejected> feature. To continue translation when features are rejected, change 'Workspace Parameters' > Translation > 'Rejected Feature Handling' to 'Continue Translation''

2024-09-11 10:32:43| 0.0| 0.0|ERROR |FeatureReader (QueryFactory): Termination Message: '%0'

2024-09-11 10:32:43| 0.0| 0.0|ERROR |Q5314A_karttalehti_SHAPEFILE_2_-1_30_Player (RecorderFactory): FeatureReader_<Rejected>: Termination Message: 'FeatureReader output a <Rejected> feature. To continue translation when features are rejected, change 'Workspace Parameters' > Translation > 'Rejected Feature Handling' to 'Continue Translation''

 

 

I have turned ignore applications schema on but I still get the same error. Is the problem on the server side and is there any possibility to read this with FME? Service seems to be working fine with QGIS. I’m using FME Desktop 2021.2.

 

When I try using FME 2021.2 with https://avoin.metsakeskus.fi/rajapinnat/v1/gridcell/wfs in a WFS FeatureReader it does work when the version is set at 1.0.0. But it only returns the first 10.000 features.

To get all features, you’ll need version 2.0.0, which uses pagination to loop through the dataset to get all data, but then I get the same error about the namespace. When I try using FME 2024.1 I get similar results.

So no solutions from my side, sorry.


I have a half finished example with the httpcaller that does work for wfs 2.0.0 and can read past 1000 features but you need to reconstruct your features by either using the XMLFragmenter with some other transformers or by using the XMLFeatureMapper but you need to write a some sort of XML template to get that to work. The example is in the attachments. Sorry for not finishing it but it was eating up a little too much time😣

 

p.s. I don't know what is happening what is causing the problem but what did catch my attention is that the title of the "Featuretype” (in WFS called TypeName) was gridcells but the actual name was v1:gridcells so maybe that is what was going wrong in the reader.


Reply