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 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?


[cid:image002.jpg@01D146DE.82E00AE0]

[2016 100 Best 
Companies]<http://www.korterra.com/korterra-inc-recognized-as-a-recipient-of-the-100-best-companies-to-work-for-award-in-2016>


Jeffrey C. Dege
Senior Programmer Analyst

phone     952.368.1911 x 3148
email      jeff.d...@korterra.com <mailto:jeff.d...@korterra.comĀ >
website   http://www.korterra.com/

   [cid:image003.png@01D1371B.54A020C0] 
<http://www.facebook.com/KorTerraInc#!/KorTerraInc?fref=ts>  
[cid:image004.png@01D1371B.54A020C0] <http://twitter.com/KorTerraInc>  
[cid:image005.png@01D1371B.54A020C0] 
<http://www.linkedin.com/company/korterra-inc.>  
[cid:image006.png@01D1371B.54A020C0] <http://www.youtube.com/user/KorTerraInc>  
 [cid:image008.png@01D1371B.54A020C0] <http://www.korterra.com/rss>



------------------------------------------------------------------------------
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