public static XmlDocument Get_MetadataReport(SDMXSchemaType schemaType, string TargetObjectId, MetadataTypes metadataType, string agencyId, string language, DIConnection DIConnection, DIQueries DIQueries) { XmlDocument RetVal; MetadataReportUtility MetadataReportUtility; RetVal = null; MetadataReportUtility = null; try { MetadataReportUtility = new MetadataReportUtility(agencyId, language, null, DIConnection, DIQueries); RetVal = MetadataReportUtility.Get_MetadataReport(TargetObjectId, metadataType); } catch (Exception ex) { RetVal = null; throw ex; } finally { } return RetVal; }
public static XmlDocument Get_MetadataReport(SDMXSchemaType schemaType, XmlDocument query, string language, Header header, DIConnection DIConnection, DIQueries DIQueries) { XmlDocument RetVal; MetadataReportUtility MetadataReportUtility; RetVal = null; MetadataReportUtility = null; try { MetadataReportUtility = new MetadataReportUtility(string.Empty, language, header, DIConnection, DIQueries); RetVal = MetadataReportUtility.Get_MetadataReport(query); } catch (Exception ex) { if (!ex.Message.Contains(Constants.SDMXWebServices.Exceptions.InvalidSyntax.Message) && !ex.Message.Contains(Constants.SDMXWebServices.Exceptions.NoResults.Message) && !ex.Message.Contains(Constants.SDMXWebServices.Exceptions.NotImplemented.Message)) { throw new Exception(Constants.SDMXWebServices.Exceptions.ServerError.Message); } else { throw ex; } } finally { } return RetVal; }