/// <summary>
        /// Describes the schema of the underlying data and services to the K2 platform.
        /// </summary>
        /// <returns>A string containing the schema XML.</returns>
        public override string DescribeSchema()
        {
            try
            {
                // Makes better use of resources and avoids any unnecessary open connections to data sources.
                using (DataConnector connector = new DataConnector(this))
                {
                    // Get the configuration from the service instance.
                    connector.GetConfiguration();
                    // Set the type mappings.
                    connector.SetTypeMappings();
                    // Describe the schema.
                    connector.DescribeSchema();
                    // Set up the service instance.
                    connector.SetupService();
                }

                // Indicate that the operation was successful.
                ServicePackage.IsSuccessful = true;
            }
            catch (Exception ex)
            {
                // Record the exception message and indicate that this was an error.
                ServicePackage.ServiceMessages.Add(ex.Message, MessageSeverity.Error);
                if (ex.InnerException != null)
                {
                    ServicePackage.ServiceMessages.Add(ex.InnerException.Message, MessageSeverity.Error);
                }
                // Indicate that the operation was unsuccessful.
                ServicePackage.IsSuccessful = false;
            }

            return(base.DescribeSchema());
        }
        /// <summary>
        /// Describes the schema of the underlying data and services to the K2 platform.
        /// </summary>
        /// <returns>A string containing the schema XML.</returns>
        public override string DescribeSchema()
        {
            try
            {
                // Makes better use of resources and avoids any unnecessary open connections to data sources.
                using (DataConnector connector = new DataConnector(this))
                {
                    // Get the configuration from the service instance.
                    connector.GetConfiguration();
                    // Set the type mappings.
                    connector.SetTypeMappings();
                    // Describe the schema.
                    connector.DescribeSchema();
                    // Set up the service instance.
                    connector.SetupService();
                }

                // Indicate that the operation was successful.
                ServicePackage.IsSuccessful = true;
            }
            catch (Exception ex)
            {
                // Record the exception message and indicate that this was an error.
                ServicePackage.ServiceMessages.Add(ex.Message, MessageSeverity.Error);
                if (ex.InnerException != null)
                {
                    ServicePackage.ServiceMessages.Add(ex.InnerException.Message, MessageSeverity.Error);
                }
                // Indicate that the operation was unsuccessful.
                ServicePackage.IsSuccessful = false;
            }

            return base.DescribeSchema();
        }