public string GetDataForGenerateApiCall(string requestParam) { string RetVal; string[] Params; int DBNId; string SelectedFunction; string Id; string AgencyId; string Version; string UserIdAndType; string UploadedHeaderFileWPath, UploadedHeaderFolderPath; Registry.RegistryService Service; SDMXObjectModel.Message.StructureHeaderType Header; SDMXApi_2_0.Message.HeaderType Header_2_0; XmlDocument Query; XmlElement Element; XmlDocument Response; XmlDocument UploadedHeaderXml; string agencyId; List<bool> isSOAPMailIds; List<string> notificationMailIds; List<bool> isSOAPHTTPs; List<string> notificationHTTPs; DateTime startDate; DateTime endDate; string eventSelector; Dictionary<string, string> dictCategories; string mfdId; string CategoriesGIDAndSchemeIds; string CategoryGID; string CategorySchemeId; string DFDOrMFDId; string WebServiceURL; bool IsREST; string WADLURL; bool IsSOAP; string WSDLURL; string FileURL; string RequestURL; string ResponseURL; string preferredLangNid; string[] DBDetails; string checkIfSDMXDB; RetVal = string.Empty; Params = null; DBNId = -1; SelectedFunction = string.Empty; Id = string.Empty; AgencyId = string.Empty; Version = string.Empty; UserIdAndType = string.Empty; Service = new Registry.RegistryService(); Service.Url = HttpContext.Current.Request.Url.OriginalString.Substring(0, HttpContext.Current.Request.Url.OriginalString.IndexOf("libraries")) + Constants.FolderName.SDMX.RegistryServicePath; Query = new XmlDocument(); Response = new XmlDocument(); Element = null; agencyId = string.Empty; isSOAPMailIds = new List<bool>(); notificationMailIds = new List<string>(); isSOAPHTTPs = new List<bool>(); notificationHTTPs = new List<string>(); startDate = new DateTime(); endDate = new DateTime(); eventSelector = string.Empty; dictCategories = new Dictionary<string, string>(); mfdId = string.Empty; CategoriesGIDAndSchemeIds = string.Empty; CategoryGID = string.Empty; CategorySchemeId = string.Empty; DFDOrMFDId = string.Empty; WebServiceURL = string.Empty; IsREST = false; WADLURL = string.Empty; IsSOAP = false; WSDLURL = string.Empty; FileURL = string.Empty; RequestURL = string.Empty; ResponseURL = string.Empty; preferredLangNid = string.Empty; DBDetails = null; checkIfSDMXDB = string.Empty; Header = new SDMXObjectModel.Message.StructureHeaderType(); Header_2_0 = new SDMXApi_2_0.Message.HeaderType(); UploadedHeaderXml = new XmlDocument(); UploadedHeaderFolderPath = Server.MapPath("../../stock/data"); try { Params = Global.SplitString(requestParam, Constants.Delimiters.ParamDelimiter); DBNId = Convert.ToInt32(Params[0].ToString().Trim()); SelectedFunction = Params[1].ToString().Trim(); DBDetails = Global.GetDbConnectionDetails(Convert.ToString(DBNId)); checkIfSDMXDB = DBDetails[4].ToString(); UploadedHeaderFileWPath = UploadedHeaderFolderPath + "/" + DBNId + "/" + "sdmx" + "/" + DevInfo.Lib.DI_LibSDMX.Constants.Header.FileName; if (File.Exists(UploadedHeaderFileWPath)) { UploadedHeaderXml.Load(UploadedHeaderFileWPath); if (checkIfSDMXDB == "true") { SDMXApi_2_0.Message.StructureType UploadedDSDStructure = new SDMXApi_2_0.Message.StructureType(); UploadedDSDStructure = (SDMXApi_2_0.Message.StructureType)SDMXApi_2_0.Deserializer.LoadFromXmlDocument(typeof(SDMXApi_2_0.Message.StructureType), UploadedHeaderXml); Header_2_0 = UploadedDSDStructure.Header; } else { SDMXObjectModel.Message.StructureType UploadedDSDStructure = new SDMXObjectModel.Message.StructureType(); UploadedDSDStructure = (SDMXObjectModel.Message.StructureType)SDMXObjectModel.Deserializer.LoadFromXmlDocument(typeof(SDMXObjectModel.Message.StructureType), UploadedHeaderXml); Header = UploadedDSDStructure.Header; } } if ((SelectedFunction == "QuerySubscription") || (SelectedFunction == "QueryRegistration")) { UserIdAndType = Params[2].ToString().Trim(); } else if (SelectedFunction == "SubmitSubscription") { UserIdAndType = Params[2].ToString().Trim(); if (Params[3].ToString().Trim() == "0") { isSOAPMailIds = new List<bool>(); isSOAPMailIds.Add(false); isSOAPHTTPs = new List<bool>(); isSOAPHTTPs.Add(false); } else { isSOAPMailIds = new List<bool>(); isSOAPMailIds.Add(true); isSOAPHTTPs = new List<bool>(); isSOAPHTTPs.Add(true); } notificationMailIds = new List<string>(); notificationMailIds.Add(Params[4].ToString().Trim()); notificationHTTPs = new List<string>(); notificationHTTPs.Add(Params[5].ToString().Trim()); startDate = DateTime.ParseExact(Params[6].ToString().Trim(), "dd-MM-yyyy", null); endDate = DateTime.ParseExact(Params[7].ToString().Trim(), "dd-MM-yyyy", null); eventSelector = Params[8].ToString().Trim(); CategoriesGIDAndSchemeIds = Params[9].ToString().Trim(); dictCategories = new Dictionary<string, string>(); if (eventSelector == "Data Registration") { foreach (string CategoryGIDAndSchemeId in Global.SplitString(CategoriesGIDAndSchemeIds, ",")) { CategoryGID = CategoryGIDAndSchemeId.Split('|')[0]; CategorySchemeId = CategoryGIDAndSchemeId.Split('|')[1]; dictCategories.Add(CategoryGID, CategorySchemeId); } } agencyId = Global.Get_AgencyId_From_DFD(DBNId.ToString()); mfdId = Params[10].ToString().Trim(); preferredLangNid = Params[11].ToString().Trim(); } else if (SelectedFunction == "SubmitRegistration") { UserIdAndType = Params[2].ToString().Trim(); agencyId = Global.Get_AgencyId_From_DFD(DBNId.ToString()); DFDOrMFDId = Params[3].ToString().Trim(); FileURL = Params[4].ToString().Trim(); } else { Id = Params[2].ToString().Trim(); AgencyId = Params[3].ToString().Trim(); Version = Params[4].ToString().Trim(); } Service.Url += "?p=" + DBNId.ToString(); RetVal = Service.Url; RetVal += Constants.Delimiters.ParamDelimiter + SelectedFunction; switch (SelectedFunction) { case "GetDataflow": Query = GetQueryXmlDocumentOnTypeBasis(0, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetDataflow(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetMetadataflow": Query = GetQueryXmlDocumentOnTypeBasis(1, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetMetadataflow(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetDataStructure": Query = GetQueryXmlDocumentOnTypeBasis(2, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetDataStructure(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetMetadataStructure": Query = GetQueryXmlDocumentOnTypeBasis(3, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetMetadataStructure(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetCategoryScheme": Query = GetQueryXmlDocumentOnTypeBasis(4, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetCategoryScheme(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetCategorisation": Query = GetQueryXmlDocumentOnTypeBasis(5, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetCategorisation(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetConceptScheme": Query = GetQueryXmlDocumentOnTypeBasis(6, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetConceptScheme(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetCodelist": Query = GetQueryXmlDocumentOnTypeBasis(7, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetCodelist(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetOrganisationScheme": Query = GetQueryXmlDocumentOnTypeBasis(8, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetOrganisationScheme(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetProvisionAgreement": Query = GetQueryXmlDocumentOnTypeBasis(9, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetProvisionAgreement(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetConstraint": Query = GetQueryXmlDocumentOnTypeBasis(10, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetConstraint(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetStructures": Query = GetQueryXmlDocumentOnTypeBasis(11, Id, AgencyId, Version, string.Empty); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.GetStructures(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "QuerySubscription": Query = GetQueryXmlDocumentOnTypeBasis(12, Id, AgencyId, Version, UserIdAndType); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.QuerySubscription(ref Element); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "QueryRegistration": Query = GetQueryXmlDocumentOnTypeBasis(13, Id, AgencyId, Version, UserIdAndType); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.QueryRegistration(ref Element,preferredLangNid); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "SubmitSubscription": Query = GetQueryXmlDocumentForSubmitSubscription(ActionType.Append, UserIdAndType, agencyId, isSOAPMailIds, notificationMailIds, isSOAPHTTPs, notificationHTTPs, startDate, endDate, eventSelector, dictCategories, mfdId, string.Empty,Header); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.SubmitSubscription(ref Element, preferredLangNid);//language code Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "SubmitRegistration": Query = GetQueryXmlDocumentForSubmitRegistration(UserIdAndType, agencyId, DFDOrMFDId, WebServiceURL, IsREST, WADLURL, IsSOAP, WSDLURL, FileURL); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Query); Element = Query.DocumentElement; Service.SubmitRegistration(ref Element, string.Empty, preferredLangNid); Response.LoadXml(Element.OuterXml); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); RequestURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Query)); ResponseURL = SaveContentTemporarilyandDeleteOtherFiles(this.Get_Formatted_XML(Response)); RetVal += Constants.Delimiters.ParamDelimiter + RequestURL; RetVal += Constants.Delimiters.ParamDelimiter + ResponseURL; break; case "GetGenericData": break; case "GetGenericTimeSeriesData": break; case "GetStructureSpecificData": break; case "GetStructureSpecificTimeSeriesData": break; case "GetGenericMetadata": break; case "GetStructureSpecificMetadata": break; case "SubmitStructure": break; case "GetReportingTaxonomy": break; case "GetStructureSet": break; case "GetProcess": break; case "GetHierarchicalCodelist": break; case "GetDataSchema": break; case "GetMetadataSchema": break; default: break; } } catch (SoapException SOAPex) { Response.LoadXml(SOAPex.Detail.InnerText); RetVal += Constants.Delimiters.ParamDelimiter + this.Get_Formatted_XML(Response); Global.CreateExceptionString(SOAPex, null); } catch (Exception ex) { RetVal += "false" + Constants.Delimiters.ParamDelimiter + ex.Message; Global.CreateExceptionString(ex, null); } finally { } return RetVal; }
public string DeleteSubscription(string requestParam) { string RetVal; string[] Params; string Action; string NotificationMail; string NotificationHTTP; int IsSOAP; string SubscriberAssignedID; string StartDate; string EndDate; string EventSelector; string CategoriesGIDAndSchemeIds; string MFDId; string DbNId; string CodelistId; string SubscriberIdAndType; string SubscriptionId; string CategoryGID; string CategorySchemeId; string UploadedHeaderFileWPath, UploadedHeaderFolderPath; string OriginalDBNId; string[] DBDetails; Registry.RegistryService Service; XmlDocument Query; XmlElement Element; XmlDocument Response; XmlDocument UploadedHeaderXml; SDMXObjectModel.Message.RegistryInterfaceType SubRegistryInterface; SDMXObjectModel.Message.StructureHeaderType Header; List<bool> isSOAPMailIds; List<string> notificationMailIds; List<bool> isSOAPHTTPs; List<string> notificationHTTPs; DateTime startDate; DateTime endDate; Dictionary<string, string> dictCategories; string AgencyId; RetVal = "true"; Service = new Registry.RegistryService(); Query = new XmlDocument(); Response = new XmlDocument(); Element = null; SubRegistryInterface = new SDMXObjectModel.Message.RegistryInterfaceType(); Action = string.Empty; NotificationMail = string.Empty; NotificationHTTP = string.Empty; IsSOAP = 0; SubscriberAssignedID = string.Empty; StartDate = string.Empty; EndDate = string.Empty; EventSelector = string.Empty; CategoriesGIDAndSchemeIds = string.Empty; MFDId = string.Empty; DbNId = string.Empty; CodelistId = string.Empty; SubscriberIdAndType = string.Empty; CategoryGID = string.Empty; CategorySchemeId = string.Empty; isSOAPMailIds = new List<bool>(); notificationMailIds = new List<string>(); isSOAPHTTPs = new List<bool>(); notificationHTTPs = new List<string>(); dictCategories = new Dictionary<string, string>(); AgencyId = string.Empty; Header = new SDMXObjectModel.Message.StructureHeaderType(); UploadedHeaderXml = new XmlDocument(); UploadedHeaderFolderPath = Server.MapPath("../../stock/data"); OriginalDBNId = string.Empty; DBDetails = null; UploadedHeaderFileWPath = string.Empty; try { Params = Global.SplitString(requestParam, Constants.Delimiters.ParamDelimiter); Action = Params[0]; NotificationMail = Params[1]; NotificationHTTP = Params[2]; IsSOAP = Convert.ToInt16(Params[3]); StartDate = Params[4]; EndDate = Params[5]; EventSelector = Params[6]; CategoriesGIDAndSchemeIds = Params[7]; MFDId = Params[8]; DbNId = Params[9]; SubscriberIdAndType = Params[10]; SubscriptionId = Params[11]; OriginalDBNId = Params[12]; AgencyId = Global.Get_AgencyId_From_DFD(DbNId.ToString()); DBDetails = Global.GetDbConnectionDetails(DbNId); if (DbNId != OriginalDBNId && DBDetails[4] == "true") { UploadedHeaderFileWPath = UploadedHeaderFolderPath + "/" + OriginalDBNId + "/" + "sdmx" + "/" + DevInfo.Lib.DI_LibSDMX.Constants.Header.FileName; } else { UploadedHeaderFileWPath = UploadedHeaderFolderPath + "/" + DbNId + "/" + "sdmx" + "/" + DevInfo.Lib.DI_LibSDMX.Constants.Header.FileName; } SDMXObjectModel.Message.StructureType UploadedDSDStructure = new SDMXObjectModel.Message.StructureType(); if (File.Exists(UploadedHeaderFileWPath)) { UploadedHeaderXml.Load(UploadedHeaderFileWPath); UploadedDSDStructure = (SDMXObjectModel.Message.StructureType)SDMXObjectModel.Deserializer.LoadFromXmlDocument(typeof(SDMXObjectModel.Message.StructureType), UploadedHeaderXml); Header = UploadedDSDStructure.Header; } if (IsSOAP == 0) { isSOAPMailIds = new List<bool>(); isSOAPMailIds.Add(false); isSOAPHTTPs = new List<bool>(); isSOAPHTTPs.Add(false); } else { isSOAPMailIds = new List<bool>(); isSOAPMailIds.Add(true); isSOAPHTTPs = new List<bool>(); isSOAPHTTPs.Add(true); } notificationMailIds = new List<string>(); notificationMailIds.Add(NotificationMail); notificationHTTPs = new List<string>(); notificationHTTPs.Add(NotificationHTTP); startDate = DateTime.ParseExact(StartDate.ToString().Trim(), "dd-MM-yyyy", null); endDate = DateTime.ParseExact(EndDate.ToString().Trim(), "dd-MM-yyyy", null); dictCategories = new Dictionary<string, string>(); if (EventSelector == "Data Registration") { foreach (string CategoryGIDAndSchemeId in Global.SplitString(CategoriesGIDAndSchemeIds, ",")) { CategoryGID = CategoryGIDAndSchemeId.Split('|')[0]; CategorySchemeId = CategoryGIDAndSchemeId.Split('|')[1]; dictCategories.Add(CategoryGID, CategorySchemeId); } } Query = GetQueryXmlDocumentForSubmitSubscription(ActionType.Delete, SubscriberIdAndType, AgencyId, isSOAPMailIds, notificationMailIds, isSOAPHTTPs, notificationHTTPs, startDate, endDate, EventSelector, dictCategories, MFDId, SubscriptionId,Header); Element = Query.DocumentElement; Service.Url = HttpContext.Current.Request.Url.OriginalString.Substring(0, HttpContext.Current.Request.Url.OriginalString.IndexOf("libraries")) + Constants.FolderName.SDMX.RegistryServicePath; Service.Url += "?p=" + DbNId.ToString(); Service.SubmitSubscription(ref Element, string.Empty); Response.LoadXml(Element.OuterXml); SubRegistryInterface = (SDMXObjectModel.Message.RegistryInterfaceType)(SDMXObjectModel.Deserializer.LoadFromXmlDocument(typeof(SDMXObjectModel.Message.RegistryInterfaceType), Response)); if (((SDMXObjectModel.Registry.SubmitSubscriptionsResponseType)(SubRegistryInterface.Item)).SubscriptionStatus[0].StatusMessage.status == SDMXObjectModel.Registry.StatusType.Success) { RetVal = "true"; } else { RetVal = "false"; } } catch (Exception ex) { RetVal = "false" + Constants.Delimiters.ParamDelimiter + ex.Message; Global.CreateExceptionString(ex, null); } finally { } return RetVal; }