channelClass = SwitchYardServiceChannel.class;
}
Channel channel = Construction.construct(channelClass);
String name = channelModel.getName();
if (channel instanceof SwitchYardServiceChannel) {
SwitchYardServiceChannel sysc = (SwitchYardServiceChannel)channel;
if (name != null) {
sysc.setName(name);
} else {
name = sysc.getName();
}
QName serviceName = XMLHelper.createQName(channelModel.getReference());
if (serviceName != null && componentName != null) {
serviceName = ComponentNames.qualify(componentName, ComponentNames.unqualify(serviceName));
}
sysc.setServiceName(serviceName);
sysc.setOperationName(channelModel.getOperation());
sysc.setInvoker(new SwitchYardServiceInvoker(domain, componentTNS));
}
if (name == null) {
throw CommonKnowledgeMessages.MESSAGES.couldNotUseNullNameToRegisterChannel(channel.getClass().getName());
}
ncList.add(new NameChannel(name, channel));