[Geoserver-devel] [JIRA] (GEOS-7943) Virtual WMTS: Layer is not known

Eduardo Suarez-Santana created an issue

GeoServer / BugGEOS-7943

Virtual WMTS: Layer is not known

Issue Type:

BugBug

Affects Versions:

2.10.1

Assignee:

Unassigned

Components:

GWC

Created:

23/Jan/17 2:11 PM

Priority:

MediumMedium

Reporter:

Eduardo Suarez-Santana

When working with virtual workspace service WMTS, that is, something like:

http://localhost:8080/geoserver/myworkspace/gwc/service/wmts?SERVICE=WMTS&

layer are sent in capabilities without workspace prefix (GeoServerTileLayer.java):

{{ @Override
public String getName() {
// getting the current gwc operation
String gwcOperation = GwcServiceDispatcherCallback.GWC_OPERATION.get();
// checking if we are in the context of a get capabilities request
if (gwcOperation != null && gwcOperation.equalsIgnoreCase(“GetCapabilities”))

{ // this is a get capabilities request, we need to check if we are in the context of virtual service return getNoPrefixedNameIfVirtualService(); }

return info.getName();
}}}

However, when processing GetFeaturetInfo, layer name with workspace prefix is required, otherwise you get a 400 error: LAYER xxxx is not known. WMTSService.java:

{{ String layer = values.get(“layer”);
if (layer == null)

{ throw new OWSException(400, “MissingParameterValue”, “LAYER”, “Missing LAYER parameter”); }

TileLayer tileLayer = null;

try

{ tileLayer = tld.getTileLayer(layer); }

catch (GeoWebCacheException e)

{ throw new OWSException(400, “InvalidParameterValue”, “LAYER”, “LAYER " + layer + " is not known.”); }

}}

Prefix must be applied in this case for the virtual service to work.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.695.3#100025-sha1:c635a15)

Atlassian logo