List<WireSourceConfiguration> wireConfigurations = new ArrayList<WireSourceConfiguration>();
for (ConfiguredService configuredService : configuredReference.getTargetConfiguredServices()) {
String targetCompName = configuredService.getPart().getName();
String targetSerivceName = configuredService.getPort().getName();
QualifiedName targetName = new QualifiedName(targetCompName + QualifiedName.NAME_SEPARATOR + targetSerivceName);
SourceWireFactory wireFactory = wireFactoryFactory.createSourceWireFactory();
Map<Method, SourceInvocationConfiguration> iConfigMap = new HashMap<Method, SourceInvocationConfiguration>();
Set<Method> javaMethods = JavaIntrospectionHelper.getAllUniqueMethods(interfaze);
for (Method method : javaMethods) {
SourceInvocationConfiguration iConfig = new SourceInvocationConfiguration(method);
iConfigMap.put(method, iConfig);
}
WireSourceConfiguration wireConfiguration = new WireSourceConfiguration(referenceName, targetName, iConfigMap, interfaze.getClassLoader(),
messageFactory);
wireConfigurations.add(wireConfiguration);
wireFactory.setBusinessInterface(interfaze);
wireFactory.setConfiguration(wireConfiguration);
wireFactories.add(wireFactory);
}
if (policyRegistry != null) {
// invoke policy builders
policyRegistry.buildSource(configuredReference, wireConfigurations);