throws ParserConfigurationException, Exception
{
Document searchRequest = createSearchRequest(searchCriteria);
SearchResponse searchResponse = null;
try
{
if (!searchCriteria.getEndPointUrl().equals(
searchAndRetrieveServicesJavaClient.getEndpointURL() ))
{
searchAndRetrieveServicesJavaClient.setEndpointURL( searchCriteria
.getEndPointUrl() );
}
searchResponse = searchAndRetrieveServicesJavaClient.search(searchRequest
.getDocumentElement());
}
catch (Exception e)
{
// This try/catch block is only to log message to log file.
// Once's it's logged re throw the exception so that it is handled in web flow.
log.error("Caught exception when invoking search web service "
+ e.getMessage());
throw e;
}
String result = null;
if (searchResponse != null)
{
Element searchResultElement = (Element) searchResponse.getAny();
result = this.processBase64ImageElements(
searchResultElement, externalContext);
}