protected SearchEngineResponse fetchSearchResponse() throws Exception
{
final String serviceURL = buildServiceUrl();
final SearchEngineResponse response = new SearchEngineResponse();
final ProcessingResult processingResult = loadProcessingResult(
serviceURL,
toCarrot2Xslt,
getXsltParameters(),
response.metadata,
getUser(),
getPassword(),
redirectStrategy);
final List<Document> documents = processingResult.getDocuments();
if (documents != null)
{
response.results.addAll(documents);
final Map<String, Object> resultAttributes = processingResult.getAttributes();
response.metadata
.put(SearchEngineResponse.RESULTS_TOTAL_KEY, resultAttributes
.containsKey(AttributeNames.RESULTS_TOTAL) ? resultAttributes
.get(AttributeNames.RESULTS_TOTAL) : (long) documents.size());
}