protected WMTSGetFeatureInfo(ConveyorTile convTile) throws OWSException { String[] keys = {"i", "j"}; Map<String, String> values; values = ServletUtils.selectedStringsFromMap( convTile.getRequestParameters(), convTile.servletReq.getCharacterEncoding(), keys); try { i = Integer.parseInt(values.get("i")); } catch (NumberFormatException nfe) { throw new OWSException(400, "MissingParameterValue", "I", "I was not specified"); } try { j = Integer.parseInt(values.get("j")); } catch (NumberFormatException nfe) { throw new OWSException(400, "MissingParameterValue", "J", "J was not specified"); } this.convTile = convTile; }
if (requestedServiceName == null) { throw new OWSException( 400, "MissingParameterValue", throw new OWSException( 400, "InvalidParameterValue",
/** Helper method that performs CITE tests mandatory validations. */ private static void performCiteValidation(HttpServletRequest request) throws OWSException { // paths validation are not done for WMTS REST API if (isRestRequest(request)) { return; } // base path should end with WMTS String basePath = request.getPathInfo(); String[] paths = basePath.split("/"); String lastPath = paths[paths.length - 1]; if (!lastPath.equalsIgnoreCase("WMTS")) { // invalid base path, not found should be returned throw new OWSException( 404, "NoApplicableCode", "request", "Service or request not found"); } // service query parameter is mandatory and should be equal to WMTS validateWmtsServiceName("wmts", request); }
throw new OWSException( 400, "MissingParameterValue", "LAYER", "Missing LAYER parameter"); tileLayer = tld.getTileLayer(layer); } catch (GeoWebCacheException e) { throw new OWSException( 400, "InvalidParameterValue", "LAYER", "LAYER " + layer + " is not known."); throw new OWSException( e.getHttpCode(), e.getExceptionCode(), e.getLocator(), e.getMessage()); } catch (GeoWebCacheException e) { throw new OWSException( 500, "NoApplicableCode", String format = values.get("format"); if (format == null) { throw new OWSException( 400, "MissingParameterValue", mimeType = MimeType.createFromFormat(format); } catch (MimeException me) { throw new OWSException( 400, "InvalidParameterValue", throw new OWSException( 400,
if (req == null) { throw new OWSException( 400, "MissingParameterValue", "request", "Missing Request parameter"); } else { if (foundIndex < 0) { throw new OWSException( 400, "VersionNegotiationFailed", throw new OWSException( 400, "MissingParameterValue", throw new OWSException( 400, "InvalidParameterValue",
public void testLocator() throws Exception { OWSException xssExceptionLocator = new OWSException(httpCode, exceptionCode, textToEncode, "exceptionText"); assertTrue(isXmlEncoded(xssExceptionLocator)); }
public void testText() throws Exception { OWSException xssExceptionText = new OWSException(httpCode, exceptionCode, "locator", textToEncode); assertTrue(isXmlEncoded(xssExceptionText)); }
throw new OWSException( 400, "PointIJOutOfRange", throw new OWSException( 400, "PointIJOutOfRange", j); } catch (GeoWebCacheException e) { throw new OWSException(500, "NoApplicableCode", "", e.getMessage());
layer = tileLayerDispatcher.getTileLayer(layerName); if (!layer.isEnabled()) { throw new OWSException( 400, "InvalidParameterValue",