if (serviceName != null && _componentName != null) {
serviceName = ComponentNames.qualify(_componentName, ComponentNames.unqualify(serviceName));
}
String operationName = getOperationName(parameters);
SwitchYardServiceRequest request = new SwitchYardServiceRequest(serviceName, operationName, content);
SwitchYardServiceResponse response = getInvoker().invoke(request);
// results (output)
Map<String, Object> results = workItem.getResults();
String resultName = getResultName(parameters);
if (!response.hasFault()) {
// result (success)
if (resultName != null) {
Object result = response.getContent();
results.put(resultName, result);
}
manager.completeWorkItem(workItem.getId(), results);
} else {
// fault (failure)
String fmsg = response.getFaultMessage();
response.logFaultMessage(fmsg);
Object fault = response.getFault();
String faultName = getFaultName(parameters);
if (faultName != null) {
results.put(faultName, fault);
}
String faultEventId = getFaultEventId(parameters);