[Geoserver-users] WMS OGC-filter fails with “I dont understand the tag: gml:Polygon”

I’m trying to construct an OGC filter to pass to a WMS GetMap request to GeoServer but I can’t seem to do it. The goal is to show the parts of the layer that intersects with a supplied polygon.

Here is an explanatory image: http://moonlite.github.io/files/description.png

When I run the query I don’t get a result but get this in the server logs:

org.xml.sax.SAXException: Attempted to construct illegal filter - I dont understand the tag: gml:Polygon. HINT: tags are case-sensitive!

Any ideas?

The query:

http://kar-toffel1.kartena.intra:8080/geoserver/kartena/wms?LAYERS=kartena%3Aosakert-luftkabel&STYLES=&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&SRS=EPSG%3A2400&FILTER=%3CFilter%20xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22%3E%3CIntersects%3E%3CPropertyName%3Ethe_geom%3C%2FPropertyName%3E%3Cgml%3APolygon%20srsName%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%2Fsrs%2Fepsg.xml%232400%22%3E%3Cgml%3AouterBoundaryIs%3E%3Cgml%3ALinearRing%3E%3Cgml%3Acoordinates%3E1271018%2C6404272%201271210%2C6404272%201271210%2C6404209%201271018%2C6404272%3C%2Fgml%3Acoordinates%3E%3C%2Fgml%3ALinearRing%3E%3C%2Fgml%3AouterBoundaryIs%3E%3C%2Fgml%3APolygon%3E%3C%2FIntersects%3E%3C%2FFilter%3E&CRS=EPSG%3A2400&BBOX=1270899.0723165,6404076.7312769,1271329.8765605,6404348.0392931&WIDTH=524&HEIGHT=330

The filter unescaped:

the_geom 1271018,6404272 1271210,6404272 1271210,6404209 1271018,6404272

Thanks in advance!

Mattias at Kartena