Hello all,

Using GeoServer version: 2.22.2, I am doing WFS requests from a client application (with WFS version 1.1.0), and the client fails to parse the responses because of the srsName attribute format. According to the doc*, the format for srsName should be urn:x-ogc:def:crs:EPSG:4326 with WFS 1.1.0 and 2.0.0, but GeoServer seems to always return something in the format http://www.opengis.net/gml/srs/epsg.xml#4326. I also checked in my server config for WFS and made sure the SRS Style was set to "OGC Experimental URN".

Here is my POST request payload:

<GetFeature xmlns="http://www.opengis.net/wfs";
    service="WFS"
    version="1.1.0"
    outputFormat="GML3"
    maxFeatures="20"
    xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
    <Query typeName="feature:layer1" srsName="EPSG:2056" xmlns:feature="http://gis";>
        <Filter xmlns="http://www.opengis.net/ogc";>
            <BBOX>
                <PropertyName>shape</PropertyName>
                <Envelope xmlns="http://www.opengis.net/gml"; srsName="EPSG:2056">                     <lowerCorner>2661449.999999999 1239830.000305176</lowerCorner>                     <upperCorner>2661509.999999999 1239890.000305176</upperCorner>
                </Envelope>
            </BBOX>
        </Filter>
    </Query>
</GetFeature>

And the response:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema";
    xmlns:wfs="http://www.opengis.net/wfs";
    xmlns:gml="http://www.opengis.net/gml";
    xmlns:gis="http://gis";
    xmlns:si="http://www.w3.org/2001/XMLSchema-instance";
    numberOfFeatures="1"
    timeStamp="2023-08-11T13:16:41.918Z"
    xsi:schemaLocation="http://gis http://geoserver:8080/geoserver/gis/wfs?service=WFS&amp;version=1.1.0&amp;request=DescribeFeatureType&amp;typeName=gis%3Alayer1 http://www.opengis.net/wfs http://geoserver:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd";>
    <gml:featureMembers>
        <gis:layer1 gml:id="layer1.140">
            <gis:typ>1 B0</gis:typ>
            <gis:rotation>270.00000000</gis:rotation>
            <gis:shape>
                <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#2056"; srsDimension="2">
                    <gml:pos>2661466.6601 1239877.4467</gml:pos>
                </gml:Point>
            </gis:shape>
        </gis:layer1>
    </gml:featureMembers>
</wfs:FeatureCollection>

I've also tried with WFS 2.0.0 / GML 3.2, the srsName still comes in the URL format.
Does anyone have an idea what could be the issue? Many thanks in advance.
Cécile

*Documentation:
https://docs.geoserver.org/2.22.x/en/user/services/wfs/basics.html#differences-between-wfs-versions
https://docs.geoserver.org/main/en/user/services/wfs/webadmin.html#gml
--
*camptocamp*
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

*Cécile Vuilleumier
*
Geospatial developer
*
*
*Camptocamp SA*
Route de la Chaux 4
Bâtiment A (Feuille)
1030 Bussigny
Switzerland
+41 62 544 03 77 (direct)
+41 21 619 10 10 (central)
www.camptocamp.com <http://www.camptocamp.com>
_______________________________________________
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

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


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

Reply via email to