I’m trying to get even the simplest WFS HTTP_POST request to work, against a GeoServer WFS endpoint.
This HTTP_GET request works, and returns what I expect (newlines inserted for clarity):
http://mygeoserver.com/geoserver/ows?
service=wfs&
version=2.0.0&
request=getfeature&
count=3&
typenames=mynamespace:myfeaturetype&
cql_filter=dccode=%27XYZ%27
I’d expect this HTTP_POST request:
http://mygeoserver.com/geoserver/ows
with this request body:
<GetFeature
version=“2.0.0”
service=“WFS”
count=“3”
xmlns=“http://www.opengis.net/wfs/2.0”
xmlns:fes=“http://www.opengis.net/fes/2.0”
xmlns:gsml=“http://xmlns.geosciml.org/GeoSciML-Core/3.2”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation="http://www.opengis.net/wfs/2.0
http://schemas.opengis.net/wfs/2.0/wfs.xsd"
<Query
typeNames=“mynamespace:myfeaturetype”
<Filter
xmlns=“http://www.opengis.net/fes/2.0”
xmlns:xlink=“http://www.w3.org/1999/xlink”
xmlns:gsml=“http://xmlns.geosciml.org/GeoSciML-Core/3.2” >
dccode
XYZ
to return the same.
Instead I get an error:
cvc-datatype-valid.1.2.3: ‘mynamespace:myfeaturetype’ is not a valid value of union type ‘TypeNamesType’.
cvc-attribute.3: The value ‘mynamespace:myfeaturetype’ of attribute ‘typeNames’ on element ‘Query’ is not valid with respect to its type, ‘TypeNamesListType’.
What’s throwing me for a loop is that the very same value that works for the typeNames parameter in the HTTP_GET throws an error in the HTTP_POST.
The problem seems to be that I need to specify a URL with a namespace definition in the XML for “mynamespace”.
<Query
typeNames=“mynamespace:myfeaturetype”
xmlns:mynamespace=“http://???”
I’m assuming that this is available, somewhere within my GeoServer installation. But where?
···
Jeffrey C. Dege Senior Programmer Analyst phone 952.368.1911 x 3148 email jeff.dege@anonymised.com website http://www.korterra.com/ |
---|