As of 2.19.3/2.20.0 (2.18.6 as well I guess) there is a mismatch in the typeName reported for a WMS layer when using DescribeLayer and the type name in the WFS capabilities document.
I’ve narrowed this down to the fix for GEOS-10215 (see below for details).
When looking at the “USA Population” (topp/states); before the fix for GEOS-10215 Resolved the reponse stated <Query typeName="topp:states" />
after the fix it has become <Query typeName="states" /> this creates a problem in our application as we match the WFS feature type by name with the typeName reported by the DescribeLayer response to the WFS typeName. The actual problem is that we store this match in our application database this information can be refreshed in case layers are added/removed or featuretypes are changed and when a geoserver instance is upgraded to a version that has the fixes for GEOS-10215 Resolved things break because the WFS typenames no longer match the describelayer typenames.
I know there is a checkbox somewhere to have qualified layernames “Include Layer Prefix in Local Workspace Capabilities“, but that would only work for a new/clean install as it changes the layernames making our software decide that the previous layer eg “states” was deleted in geoserver and no longer available so it gets removed including any and all extra configuration and there is now a new layer “topp:states”.
2.19.2- Download wget <[https://sourceforge.net/projects/geoserver/files/GeoServer/2.19.2/geoserver-2.19.2-bin.zip](https://sourceforge.net/projects/geoserver/files/GeoServer/2.19.2/geoserver-2.19.2-bin.zip) > and unzip geoserver-2.19.2-bin.zip -d geoserver-2.19.2-bin
- run GeoServer 2.19.2 using
GEOSERVER_DATA_DIR="";GEOSERVER_HOME= }} pwd {{ /geoserver-2.19.2-bin ./geoserver-2.19.2-bin/bin/startup.sh
- execute
curl "<[http://localhost:8080/geoserver/topp/wms?service=WMS&request=GetCapabilities&version=1.1.1](http://localhost:8080/geoserver/topp/wms?service=WMS&request=GetCapabilities&version=1.1.1)"> | xmlstarlet fo | grep -B5 states
</Layer>
<Layer queryable="1" opaque="0">
<Name>states</Name>
<Title>USA Population</Title>
<Abstract>This is some census data on the states.</Abstract>
<KeywordList>
<Keyword>census</Keyword>
<Keyword>united</Keyword>
<Keyword>boundaries</Keyword>
<Keyword>state</Keyword>
<Keyword>states</Keyword>
- execute
curl "<[http://localhost:8080/geoserver/topp/wms?service=WFS&request=GetCapabilities](http://localhost:8080/geoserver/topp/wms?service=WFS&request=GetCapabilities)"> | xmlstarlet fo | grep -B5 states
</FeatureType>
<FeatureType xmlns:topp="<http://www.openplans.org/topp">>
<Name>topp:states</Name>
<Title>USA Population</Title>
<Abstract>This is some census data on the states.</Abstract>
<ows:Keywords>
<ows:Keyword>census</ows:Keyword>
<ows:Keyword>united</ows:Keyword>
<ows:Keyword>boundaries</ows:Keyword>
<ows:Keyword>state</ows:Keyword>
<ows:Keyword>states</ows:Keyword>
- execute
curl "<[http://localhost:8080/geoserver/topp/wms?service=WMS&request=DescribeLayer&version=1.1.1&LAYERS=states](http://localhost:8080/geoserver/topp/wms?service=WMS&request=DescribeLayer&version=1.1.1&LAYERS=states)"> | xmlstarlet fo
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE WMS_DescribeLayerResponse SYSTEM "<http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_DescribeLayerResponse.dtd">>
<WMS_DescribeLayerResponse version="1.1.1">
<LayerDescription name="states" wfs="<http://localhost:8080/geoserver/topp/wfs?"> owsURL="<http://localhost:8080/geoserver/topp/wfs?"> owsType="WFS">
<Query typeName="topp:states"/>
</LayerDescription>
</WMS_DescribeLayerResponse>
- execute
curl "<[http://localhost:8080/geoserver/topp/wfs?service=WFS&request=DescribeFeaturetype&version=1.0.0&typeName=topp:states](http://localhost:8080/geoserver/topp/wfs?service=WFS&request=DescribeFeaturetype&version=1.0.0&typeName=topp:states)" >
(note that using typeName=states instead of typeName=topp:states gives an identical result)
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="<http://www.w3.org/2001/XMLSchema"> xmlns:gml="<http://www.opengis.net/gml"> xmlns:topp="<http://www.openplans.org/topp"> elementFormDefault="qualified" targetNamespace="<http://www.openplans.org/topp">>
<xsd:import namespace="<http://www.opengis.net/gml"> schemaLocation="<http://localhost:8080/geoserver/schemas/gml/2.1.2/feature.xsd"/>>
<xsd:complexType name="statesType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:MultiPolygonPropertyType"/>
...
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="states" substitutionGroup="gml:_Feature" type="topp:statesType"/>
</xsd:schema>
2.19.3- Download wget <[https://sourceforge.net/projects/geoserver/files/GeoServer/2.19.3/geoserver-2.19.3-bin.zip](https://sourceforge.net/projects/geoserver/files/GeoServer/2.19.3/geoserver-2.19.3-bin.zip) > and unzip geoserver-2.19.3-bin.zip -d geoserver-2.19.3-bin
- run GeoServer 2.19.3 using
GEOSERVER_DATA_DIR="";GEOSERVER_HOME= }} pwd {{ /geoserver-2.19.3-bin ./geoserver-2.19.3-bin/bin/startup.sh
- execute
curl "<[http://localhost:8080/geoserver/topp/wms?service=WMS&request=GetCapabilities&version=1.1.1](http://localhost:8080/geoserver/topp/wms?service=WMS&request=GetCapabilities&version=1.1.1)"> | xmlstarlet fo | grep -B5 states
</Layer>
<Layer queryable="1" opaque="0">
<Name>states</Name>
<Title>USA Population</Title>
<Abstract>This is some census data on the states.</Abstract>
<KeywordList>
<Keyword>census</Keyword>
<Keyword>united</Keyword>
<Keyword>boundaries</Keyword>
<Keyword>state</Keyword>
<Keyword>states</Keyword>
- execute
curl "<[http://localhost:8080/geoserver/topp/wms?service=WFS&request=GetCapabilities](http://localhost:8080/geoserver/topp/wms?service=WFS&request=GetCapabilities)"> | xmlstarlet fo | grep -B5 states
</FeatureType>
<FeatureType xmlns:topp="<http://www.openplans.org/topp">>
<Name>topp:states</Name>
<Title>USA Population</Title>
<Abstract>This is some census data on the states.</Abstract>
<ows:Keywords>
<ows:Keyword>census</ows:Keyword>
<ows:Keyword>united</ows:Keyword>
<ows:Keyword>boundaries</ows:Keyword>
<ows:Keyword>state</ows:Keyword>
<ows:Keyword>states</ows:Keyword>
- execute
curl "<[http://localhost:8080/geoserver/topp/wms?service=WMS&request=DescribeLayer&version=1.1.1&LAYERS=states](http://localhost:8080/geoserver/topp/wms?service=WMS&request=DescribeLayer&version=1.1.1&LAYERS=states)"> | xmlstarlet fo
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE WMS_DescribeLayerResponse SYSTEM "<http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_DescribeLayerResponse.dtd">>
<WMS_DescribeLayerResponse version="1.1.1">
<LayerDescription name="states" wfs="<http://localhost:8080/geoserver/topp/wfs?"> owsURL="<http://localhost:8080/geoserver/topp/wfs?"> owsType="WFS">
<Query typeName="states"/>
</LayerDescription>
</WMS_DescribeLayerResponse>
- execute
curl "<[http://localhost:8080/geoserver/topp/wfs?service=WFS&request=DescribeFeaturetype&version=1.0.0&typeName=states](http://localhost:8080/geoserver/topp/wfs?service=WFS&request=DescribeFeaturetype&version=1.0.0&typeName=states)"> -o 2.19.3-topp-states-describefeaturetype.xml
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="<http://www.w3.org/2001/XMLSchema"> xmlns:gml="<http://www.opengis.net/gml"> xmlns:topp="<http://www.openplans.org/topp"> elementFormDefault="qualified" targetNamespace="<http://www.openplans.org/topp">>
<xsd:import namespace="<http://www.opengis.net/gml"> schemaLocation="<http://localhost:8080/geoserver/schemas/gml/2.1.2/feature.xsd"/>>
<xsd:complexType name="statesType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:MultiPolygonPropertyType"/>
...
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="states" substitutionGroup="gml:_Feature" type="topp:statesType"/>
</xsd:schema>
Comparing- The Capabilities documents are identical.
- The DescribeLayer responses differ in that 2.19.2 has
topp:states for the typeName whereas 2.19.3 has just states as the typeName
- The DescribeFeaturetype responses are identical
Bisecting
Note that for both builds the latest geotools 25.x/25-SNAPSHOT was used.
building 3251fb8aae5b8383fd87183f14aaa782311230ab (GEOS-10215)
git checkout 3251fb8aae5b8383fd87183f14aaa782311230ab
mvn -T4.2C -fae -Dfmt.skip=true -Prelease -f src/pom.xml clean install -DskipTests=true
mvn -f src/pom.xml assembly:single -nsu -N
rm -rf /tmp/geoserver-bin
unzip src/target/release/geoserver-2.19-SNAPSHOT-bin.zip -d /tmp/geoserver-bin/
export GEOSERVER_DATA_DIR=/tmp/geoserver-bin/data_dir
export GEOSERVER_HOME=/tmp/geoserver-bin
export JETTY_HOME=/tmp/geoserver-bin
$GEOSERVER_HOME/bin/startup.sh
This has states in the DescribeLayer response (so not matching the WFS capabilities)
building 32bd16ffebe38c27a4a599dcfd0b2476362f48e6 (before GEOS-10215 Resolved )
git checkout 32bd16ffebe38c27a4a599dcfd0b2476362f48e6
mvn -T4.2C -fae -Dfmt.skip=true -Prelease -f src/pom.xml clean install -DskipTests=true
mvn -f src/pom.xml assembly:single -nsu -N
rm -rf /tmp/geoserver-bin
unzip src/target/release/geoserver-2.19-SNAPSHOT-bin.zip -d /tmp/geoserver-bin/
export GEOSERVER_DATA_DIR=/tmp/geoserver-bin/data_dir
export GEOSERVER_HOME=/tmp/geoserver-bin
export JETTY_HOME=/tmp/geoserver-bin
$GEOSERVER_HOME/bin/startup.sh
This has topp:states in the DescribeLayer response (matching the WFS capabilities)
|