if ((req.getOutputFormat() != null) && (!outputFormats.isEmpty()) && !outputFormats.contains(req.getOutputFormat())) { if (req.getOutputFormat().equalsIgnoreCase(outputFormat)) { continue O; if (req.getOutputFormat() != null) { throw new ServiceException( "Failed to find response for output format " + req.getOutputFormat(), ServiceException.INVALID_PARAMETER_VALUE, "outputFormat"); String msg = "No response: ( object = " + result.getClass(); if (req.getOutputFormat() != null) { msg += (", outputFormat = " + req.getOutputFormat());
if (req.getOutputFormat() == null) { req.setOutputFormat( lookupRequestBeanProperty(requestBean, "outputFormat", true));
@Override public boolean canHandle(Operation operation) { // if we don't have formats configured, we cannot respond if(formats.isEmpty()) { System.out.println("Empty formats"); return false; } if(!super.canHandle(operation)) { return false; } // check the format matches, the Dispatcher just does a case insensitive match, // but WFS is supposed to be case sensitive and so is the XSLT code Request request = Dispatcher.REQUEST.get(); if(request != null && (request.getOutputFormat() == null || !formats.containsKey(request.getOutputFormat()))) { System.out.println("Formats are: " + formats); return false; } else { return true; } }
@Override boolean matchesRequest(Request request) { if (!service.equalsIgnoreCase(request.getService())) return false; if (method == null) return true; else if (!method.equalsIgnoreCase(request.getRequest())) return false; if (outputFormat == null) return true; else if (!outputFormat.equalsIgnoreCase(request.getOutputFormat())) return false; return true; }