When I try to load a WfsFeatureTable from a WFS-Layer hosted on a MapServer, I get the following Error:
Invalid XML.: Parser couldn't move inside bounding box.
Is there any known issue with this topic in the arcgis runtime sdk for .NET 100.9?
I tried to load this Layer with the SampleApplication ArcGISRuntime.WPF.Viewer.Samples.ChangeSublayerVisibility
I had no troubles with loading WFS-FeatureTable with other WFS-Layer for example hosted on a GeoServer.
When I try to connect to the MapServer WFS-Layer on QGIS, there is know problem with this
Solved! Go to Solution.
I think I spotted the problem. Some of the layers in the capabilities document are missing information about geographic extent. These layers are:
I see that MapServer actually generates a little warning comment on these layers, right in the XML:
<ows:WGS84BoundingBox/>
<!--WARNING: Optional WGS84BoundingBox could not be established for this layer. Consider setting the EXTENT in the LAYER object, or wfs_extent metadata. Also check that your data exists in the DATA statement-->
Normally Runtime can handle layers without extent or geometry, but here MapServer does something not-by-the-specification. Instead of omitting WGS84BoundingBox completely, MapServer creates empty WGS84BoundingBox elements that lack required child elements. This causes the XML document to fail validation, and a loading error is reported by Runtime. I logged a bug with MapServer developers about this behavior. We will also look into broadening our XML parser's compatibility in future releases, to handle this edge-case and skip empty WGS84BoundingBox elements.
For now, I suggest trying MapServer's recommendation to ensure that all layers on the service have a geographic extent. Please let me know if this helps.
Cheers,
Matvei
Hello Daniel! I can think of a couple possible reasons for the service not working:
- Is WFS 2.0 enabled for this service? Runtime does not currently support the legacy WFS versions 1.0 or 1.1.
- Does the TableUrl point to the GetCapabilities endpoint of the service? For MapServer it should look something like this: http://your.domain.here/cgi-bin/mapserv?service=WFS&version=2.0.0&request=GetCapabilities (note "service", "version", and "request" parameters in the URL).
If you could share the URL of the service or a copy of the GetCapabilities response document, I would be happy to troubleshoot it further.
Hi Matvei
WFS 2.0 should be enable and the Table-URL looks like you described. Unfortunately I cannot share my URL to the public because the data of this Layer are protected, but I attached the GetCapabilities XML (URL is adjusted).
Let me know if you need further information.
Best regads,
Daniel
Von: Matvei Stefarov <geonet@esri.com>
Gesendet: Donnerstag, 8. Oktober 2020 18:56
An: Schuler Daniel <Daniel.Schuler@remec.ch>
Betreff: Re: - Re: Can not load WFS-Featuretable from URL Hosted on Mapserver
GeoNet, The Esri Community | GIS and Geospatial Professional Community <https://community.esri.com/?et=watches.email.thread>
Re: Can not load WFS-Featuretable from URL Hosted on Mapserver
reply from Matvei Stefarov<https://community.esri.com/people/MStefarov-esristaff?et=watches.email.thread> in ArcGIS Runtime SDK for .NET - View the full discussion<https://community.esri.com/message/957969-re-can-not-load-wfs-featuretable-from-url-hosted-on-mapserver?commentID=957969&et=watches.email.thread#comment-957969>
I think I spotted the problem. Some of the layers in the capabilities document are missing information about geographic extent. These layers are:
I see that MapServer actually generates a little warning comment on these layers, right in the XML:
<ows:WGS84BoundingBox/>
<!--WARNING: Optional WGS84BoundingBox could not be established for this layer. Consider setting the EXTENT in the LAYER object, or wfs_extent metadata. Also check that your data exists in the DATA statement-->
Normally Runtime can handle layers without extent or geometry, but here MapServer does something not-by-the-specification. Instead of omitting WGS84BoundingBox completely, MapServer creates empty WGS84BoundingBox elements that lack required child elements. This causes the XML document to fail validation, and a loading error is reported by Runtime. I logged a bug with MapServer developers about this behavior. We will also look into broadening our XML parser's compatibility in future releases, to handle this edge-case and skip empty WGS84BoundingBox elements.
For now, I suggest trying MapServer's recommendation to ensure that all layers on the service have a geographic extent. Please let me know if this helps.
Cheers,
Matvei
Hi Matvei
You were right. As soon as the extent were defined correctly, it worked! Thanks for your support.
Best Regards, Daniel