}
ServiceDomain serviceDomain = getServiceDomain();
if (serviceDomain == null) {
throw CommonKnowledgeMessages.MESSAGES.serviceDomainNull();
}
ServiceReference serviceReference = serviceDomain.getServiceReference(serviceName);
if (serviceReference == null) {
throw CommonKnowledgeMessages.MESSAGES.serviceReferenceNull(serviceName.toString());
}
final Exchange exchangeIn;
FaultHandler handler = new FaultHandler();
String operationName = request.getOperationName();
if (operationName != null) {
exchangeIn = serviceReference.createExchange(operationName, handler);
} else {
exchangeIn = serviceReference.createExchange(handler);
}
Message messageIn = exchangeIn.createMessage();
Context contextIn = exchangeIn.getContext(messageIn);
for (Map.Entry<String,Object> entry : request.getContext().entrySet()) {
contextIn.setProperty(entry.getKey(), entry.getValue());