When trying to parse the GetFeature response from a server, we get the error: "Bad Schema location attribute: you must have an even number of terms". Upon inspecting the response we find:
<gml:FeatureCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.risicokaart.nl/schemas/isor http://servicespub.risicokaart.nl/rk_services_pub/services/WFS-risicokaart?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&OUTPUTFORMAT=XMLSCHEMA&TYPENAME=isor:kwetsbaarobject_ziekenhuis">
It's a bit hard to spot, but there is a space before the first element in the xsi:schemaLocation. I guess that this is not correct, but real life implementations rarely are . The fix is quite easy: a trim of the value would fix this. I've created the fix (including a testcase) on: https://github.com/mtoonen/geotools/tree/extraSpaceBreaksParsing, and it fixes the problem for me. |