public static StandardizedBusinessName ToStandardizedBusinessName(this XElement element, string endPointUri) { var standardizedBusinessName = new StandardizedBusinessName(); XNamespace ns = element.GetDefaultNamespace(); standardizedBusinessName.Message = "Result"; standardizedBusinessName.BusinessName = element.Value; standardizedBusinessName.EndPointUri = endPointUri; return(standardizedBusinessName); }
public virtual StandardizedBusinessName StandardizeBusinessName(string businessName) { string endpointUri = ""; StandardizedBusinessName result = new StandardizedBusinessName { BusinessName = businessName, EndPointUri = "", Message = "" }; try { endpointUri = BuildStandardizedBusinessNameEndpointUri(businessName); XElement xml = GetXml(endpointUri); result = xml.ToStandardizedBusinessName(endpointUri); } catch (Exception ex) { using (ICERSRepositoryManager repo = ServiceLocator.GetRepositoryManager()) { ICERSSystemServiceManager services = ServiceLocator.GetSystemServiceManager(repo); services.ErrorReporting.Report(StandardizedAddressErrorMessage("AddressServiceProxy::StandardizedBusinessName", endpointUri, ex), ex); } } return(result); }