if (!XML_Q.equals(elem.getQName())) {
handleException("Unable to create the enrich mediator. " +
"Unexpected element as the enrich mediator configuration");
}
EnrichMediator enrich = new EnrichMediator();
OMElement sourceEle = elem.getFirstChildWithName(SOURCE_Q);
if (sourceEle == null) {
handleException("source element is mandatory");
}
Source source = new Source();
enrich.setSource(source);
OMElement targetEle = elem.getFirstChildWithName(TARGET_Q);
if (targetEle == null) {
handleException("target element is mandatory");
}
Target target = new Target();
enrich.setTarget(target);
populateSource(source, sourceEle);
populateTarget(target, targetEle);
return enrich;