throw new ApiRequestException("callback parameter required for jsonp queries.");
}
}
else if (format.equals("xml")) {
response.setContentType("application/xml");
new Api2XmlConverter().write(sr, response.getOutputStream());
}
else if (format.equals("pdf")) {
if (sr.getResults().size() == 0) {
throw new ApiRequestException("No matching document could be found.");
}