public void doSearch() {\r
if (errors.hasConfigurationErrors()) {\r
logger.error("Ignoring search request due to configuration errors.");\r
+ } else if (searchClient == null){\r
+ logger.error("No search client defined. A client must either be pre-configured or selected before searching.");\r
+ errors.addConfigurationError(new ConfigurationError("No client defined","Client is null","No search client defined. A client must be pre-configured or selected runtime, prior to searching."));\r
} else {\r
stateMgr.hasPendingStateChange("search",false);\r
pzresp.resetSearchResponses();\r
} else {\r
handleQueryStateChanges(commands);\r
if (pzresp.getSearch().hasApplicationError()) {\r
- logger.error("The command(s) " + commands + " are cancelled because the latest search command had an error.");\r
+ logger.error("The command(s) " + commands + " cancelled because the latest search command had an error.");\r
+ return "0";\r
+ } else if (errors.hasConfigurationErrors()) {\r
+ logger.error("The command(s) " + commands + " cancelled due to configuration errors.");\r
return "0";\r
} else {\r
logger.debug("Processing request for " + commands); \r
serviceProxyUrls = config.getMultiProperty(SERVICE_PROXY_URL_LIST,",");\r
pazpar2Urls = config.getMultiProperty(PAZPAR2_URL_LIST, ",");\r
}\r
+ logger.info(reader.document());\r
logger.info("Service Type is configured to " + serviceType);\r
\r
}\r