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"; >
            <PropertyIsEqualTo>
                <ValueReference>dccode</ValueReference>
                <Literal>XYZ</Literal>
            </PropertyIsEqualTo>
        </Filter>
    </Query>
</GetFeature>
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 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?




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to