I'm using GeoExt, OpenLayers and GeoServer. I've added a checkbox to my layer tree which, when clicked, activates a "select feature" control such that when a user clicks on the map, the feature clicked on is highlighted. My code is:

'checkchange': function(node, checked) { 
                if (checked === true) {
                    mySelectLayer = new OpenLayers.Layer.Vector("Selection", {
                        styleMap: new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"])

                    myLayerCtrl = new OpenLayers.Control.GetFeature({
                        protocol: OpenLayers.Protocol.WFS.fromWMSLayer(node.attributes.layer),
                        box: true,
                        multipleKey: "shiftKey",
                        toggleKey: "ctrlKey"
                    myLayerCtrl.events.register("featureselected", this, function(e){

                } else {

However, when a user clicks on the map the following exception is thrown by GeoServer:

org.geoserver.platform.ServiceException: No such operation WMS 1.1.0 GetFeature

I've found a number of posts on this, but no solutions. Any idea about what is causing this problem? Thanks in advance.

UPDATE: I've read that this error is as a result of the request being sent to WMS, as opposed to WFS service. My assumption, however, is that it should be possible for OpenLayers to deduce the WFS service. From the OpenLayers documentation here, the protocol parameter kind of takes care of ensuring WFS, and not WMS, is used, in my opinion. Any idea is welcome.

2 Answers 2


GeoServer Exception: No such operation WMS 1.1.0 GetFeature

That's correct there is no WMS operation called GetFeature. There is a WMS operation called GetFeatureInfo, and there is a WFS operation called GetFeature.


You are using a wrong url in your protocol; the function


doesn't change the url to the geoserver's wfs service (OpenLayers doesn't know that there is Geoserver), which is /wfs. Try to do something like

var protocol = OpenLayers.Protocol.WFS.fromWMSLayer(node.attributes.layer);
protocol.url = '/wfs';   // Add your geoserver base url

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.