String operation = message.getOperation();
Object[] params = message.getParameters();
Service service = locateService(destination, operation, params);
Object response = null;
if (service == null) {
response = new ErrorMessage("Service was null.", destination, operation, params);
LogWriter.error(getClass(), response.toString());
} else {
try {
response = service.invoke();
} catch (Exception e) {
response = new ErrorMessage("Service invocation failed: " + e.getMessage(), destination, operation,
params);
LogWriter.error(getClass(), response.toString(), e);
}
}
RemoteResponseMessage ack = message.createResponse();