private HashSet <XRegistration> readXServiceBindingRegConfig(uddi config, Dictionary <String, UDDIClerk> clerks) { HashSet <XRegistration> xRegistrations = new HashSet <XRegistration>(); if (config.client.clerks == null) { log.warn("XRegistration cannot continue, no clerks are defined!"); return(xRegistrations); } if (config.client.clerks.xregister == null || config.client.clerks.xregister.servicebinding == null) { return(xRegistrations); } if (config.client.clerks.xregister.servicebinding.Length > 0) { log.info("XRegistration " + config.client.clerks.xregister.servicebinding.Length + " serviceBinding Keys"); } for (int i = 0; i < config.client.clerks.xregister.servicebinding.Length; i++) { XRegistration xRegistration = new XRegistration(); xRegistration.setEntityKey(config.client.clerks.xregister.servicebinding[i].bindingKey); String fromClerkRef = config.client.clerks.xregister.servicebinding[i].fromClerk; if (!clerks.ContainsKey(fromClerkRef)) { throw new ConfigurationErrorsException("Could not find fromClerk with name=" + fromClerkRef); } UDDIClerk fromClerk = clerks[(fromClerkRef)]; xRegistration.setFromClerk(fromClerk); String toClerkRef = config.client.clerks.xregister.servicebinding[i].toClerk; if (!clerks.ContainsKey(toClerkRef)) { throw new ConfigurationErrorsException("Could not find toClerk with name=" + toClerkRef); } UDDIClerk toClerk = clerks[(toClerkRef)]; xRegistration.setToClerk(toClerk); log.debug(xRegistration); xRegistrations.Add(xRegistration); } return(xRegistrations); }
private HashSet<XRegistration> readXServiceBindingRegConfig(uddi config, Dictionary<String, UDDIClerk> clerks) { HashSet<XRegistration> xRegistrations = new HashSet<XRegistration>(); if (config.client.clerks == null) { log.warn("XRegistration cannot continue, no clerks are defined!"); return xRegistrations; } if (config.client.clerks.xregister == null || config.client.clerks.xregister.servicebinding == null) return xRegistrations; if (config.client.clerks.xregister.servicebinding.Length > 0) log.info("XRegistration " + config.client.clerks.xregister.servicebinding.Length + " serviceBinding Keys"); for (int i = 0; i < config.client.clerks.xregister.servicebinding.Length; i++) { XRegistration xRegistration = new XRegistration(); xRegistration.setEntityKey(config.client.clerks.xregister.servicebinding[i].bindingKey); String fromClerkRef = config.client.clerks.xregister.servicebinding[i].fromClerk; if (!clerks.ContainsKey(fromClerkRef)) throw new ConfigurationErrorsException("Could not find fromClerk with name=" + fromClerkRef); UDDIClerk fromClerk = clerks[(fromClerkRef)]; xRegistration.setFromClerk(fromClerk); String toClerkRef = config.client.clerks.xregister.servicebinding[i].toClerk; if (!clerks.ContainsKey(toClerkRef)) throw new ConfigurationErrorsException("Could not find toClerk with name=" + toClerkRef); UDDIClerk toClerk = clerks[(toClerkRef)]; xRegistration.setToClerk(toClerk); log.debug(xRegistration); xRegistrations.Add(xRegistration); } return xRegistrations; }