Exemple #1
0
        public List <BaseArtefactInfo> LoadCodelistCodes21(string dsd_id, string dsd_agency, string dsd_version)
        {
            string      QueryText;
            XmlDocument queryDoc = new XmlDocument();

            //String returnDetail=null;

            try
            {
                TextReader txtRdr = new StreamReader(_queryPath + "\\CodelistCodes.xml");
                QueryText = txtRdr.ReadToEnd();
                txtRdr.Close();
                QueryText = QueryText.Replace("###AGENCYID###", dsd_agency);
                QueryText = QueryText.Replace("###KEYFAMILYID###", dsd_id);
                QueryText = QueryText.Replace("###VERSION###", dsd_version);
                //returnDetail = this._webLayer.WebServiceInfo.WebService_ReturnDetail == ApplicationSettings.classes.services.ApplicationSettings.WebServiceInfo.RETURN_DETAIL_IMPLEMENTATION.Full ? this._webLayer.WebServiceInfo.WebService_ReturnDetail.ToString() : ApplicationSettings.classes.services.ApplicationSettings.WebServiceInfo.RETURN_DETAIL_IMPLEMENTATION.Stub.ToString();
                QueryText = QueryText.Replace("###RETURNDETAILS###", this._webLayer.WebServiceInfo.WebService_ReturnDetail.ToString());

                string ValueDomainResultDoc = null;

                queryDoc.LoadXml(QueryText);
                ValueDomainResultDoc = _webLayer.InvokeMethod(queryDoc, WebServiceConnector.WebServiceConstants.QueryType._CODELIST21);
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.LoadXml(ValueDomainResultDoc);

                List <BaseArtefactInfo> valueDomainList = MetadataRetriever.ParseValueDomainResponse(xmlDoc, this._webLayer.WebServiceInfo.WebService_ReturnDetail.ToString());

                return(valueDomainList);
            }
            catch (Exception ex)
            {
                if (ex.Message.IndexOf("Semantic Error - 007") > -1)
                {
                    return(null);
                }

                throw new Exception("[GetDataDLL.Model.ApplicationModel.MetadataLoader.LoadDataflows] Query:" + queryDoc.InnerXml + " -  " + ex.Message);
            }
        }
Exemple #2
0
        public List <BaseArtefactInfo> LoadCodelist21()
        {
            //Org.Sdmxsource.Sdmx.Api.Model.IStructureWorkspace structureworkspace;
            XmlDocument queryDoc = new XmlDocument();
            string      ValueDomainResultDoc;

            try
            {
                queryDoc.Load(_queryPath + "\\Codelist.xml");
                ValueDomainResultDoc = _webLayer.InvokeMethod(queryDoc, WebServiceConnector.WebServiceConstants.QueryType._CODELIST21);
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.LoadXml(ValueDomainResultDoc);

                List <BaseArtefactInfo> valueDomainList = MetadataRetriever.ParseValueDomainResponse(xmlDoc, "Stub");

                return(valueDomainList);
            }
            catch (Exception ex)
            {
                throw new Exception("[GetDataDLL.Model.ApplicationModel.MetadataLoader.LoadDataflows] Query:" + queryDoc.InnerXml + " -  " + ex.Message);
            }
        }