I am trying to use WFS 2.0 specifically because it supports temporal filtering. My GetCapabilities.xml
file is
<GetCapabilities
version="2.0"
service="WFS"
xmlns="http://www.opengis.net/wfs"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/2.0/wfs.xsd"/>
I use curl
to make the request i.e.
curl -X POST -H "Content-type: application/gml+xml;version=3.2" -d @GetCapabilities.xml http://ws-beta.int.unavco.org:9090/geoserver/wfs
But I receive the error:
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://ws-beta.int.unavco.org:9090/geoserver/schemas/ows/1.1.0/owsAll.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>java.lang.IllegalArgumentException: java.lang.ClassCastException@44895b09
java.lang.ClassCastException@44895b09</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
I know the problem is almost certainly in my construction of the XML file because it works over HTTP:
http://my.geoserver.url/geoserver/wfs?service=wfs&version=2.0.0&request=GetCapabilities
I seek a working version of GetCapabilities.xml
for WFS 2.0.
I have also tried using GET rather than POST, i.e.
curl -X GET -H "Content-type: application/gml+xml;version=3.2" -d @GetCapabilities.xml http://ws-beta.int.unavco.org:9090/geoserver/wfs
I get a different error in this case:
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://ws-beta.int.unavco.org:9090/geoserver/schemas/ows/1.1.0/owsAll.xsd">
<ows:Exception exceptionCode="MissingParameterValue" locator="request">
<ows:ExceptionText>Could not determine geoserver request from http request org.geoserver.platform.AdvancedDispatchFilter$AdvancedDispatchHttpRequest@66acc6c5</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
curl "http://my.geoserver.url/geoserver/wfs?service=wfs&version=2.0.0&request=GetCapabilities"
does not work? Or with single quotes if you are on Linux?