public static string GetWsdl(string name) { foreach (WSDL w in GetWSAssembly.mServicePaths) { if (w.Name == name) return w.Path; } //if not exist in buffer. XmlDocument doc = new XmlDocument(); doc.Load(System.Reflection.Assembly.GetExecutingAssembly().Location.Substring(0, System.Reflection.Assembly.GetExecutingAssembly().Location.LastIndexOf('\\')) + @"\Config.xml"); XmlNodeList ws = doc.SelectNodes("Config/ServiceWsdl/Wsdl"); foreach (XmlNode w in ws) { if (w.Attributes["Name"].Value.Trim().ToUpper() == name.Trim().ToUpper()) { WSDL wsdl = new WSDL(); wsdl.Name = name; wsdl.Path = w.InnerText.Trim(); GetWSAssembly.mServicePaths.Add(wsdl); return wsdl.Path; } } //if not find in config.xml return string.Empty; }
public static string GetWsdl(string name) { foreach (WSDL w in GetWSAssembly.mServicePaths) { if (w.Name == name) { return(w.Path); } } //if not exist in buffer. XmlDocument doc = new XmlDocument(); doc.Load(System.Reflection.Assembly.GetExecutingAssembly().Location.Substring(0, System.Reflection.Assembly.GetExecutingAssembly().Location.LastIndexOf('\\')) + @"\Config.xml"); XmlNodeList ws = doc.SelectNodes("Config/ServiceWsdl/Wsdl"); foreach (XmlNode w in ws) { if (w.Attributes["Name"].Value.Trim().ToUpper() == name.Trim().ToUpper()) { WSDL wsdl = new WSDL(); wsdl.Name = name; wsdl.Path = w.InnerText.Trim(); GetWSAssembly.mServicePaths.Add(wsdl); return(wsdl.Path); } } //if not find in config.xml return(string.Empty); }