Beispiel #1
0
        private void ParseSchemaXml(BizTalk.ExplorerOM.Schema schema)
        {
            try
            {
                this.xmlContent = schema.XmlContent.Replace("utf-16", "utf-8");
                this.xmlContent = this.xmlContent.Replace("UTF-16", "UTF-8");

                XmlDocument schemaDoc = new XmlDocument();
                schemaDoc.LoadXml(this.xmlContent);

                XmlNamespaceManager mgr = new XmlNamespaceManager(schemaDoc.NameTable);
                mgr.AddNamespace("b", "http://schemas.microsoft.com/BizTalk/2003");
                mgr.AddNamespace("x", "http://www.w3.org/2001/XMLSchema");

                LoadSchemaImports(schemaDoc, mgr);

                LoadSchemaEnvelope(schemaDoc, mgr);

                schemaDoc = null;
            }
            catch (Exception ex)
            {
                TraceManager.SmartTrace.TraceError(ex);
            }
        }
Beispiel #2
0
 private void LoadSchemaProperties(BizTalk.ExplorerOM.Schema schema)
 {
     if (schema.Properties != null)
     {
         foreach (DictionaryEntry de in schema.Properties)
         {
             this.properties.Add(de.Key.ToString());
         }
     }
 }
Beispiel #3
0
        private void LoadSchemaMetadata(BizTalk.ExplorerOM.Schema schema)
        {
            this.AssemblyName      = schema.AssemblyQualifiedName;
            this.schemaType        = (SchemaType)Enum.Parse(typeof(SchemaType), ((int)schema.Type).ToString());
            this.ApplicationName   = schema.Application.Name;
            this.CustomDescription = schema.Description;
            this.targetNamespace   = schema.TargetNameSpace;
            this.rootName          = String.IsNullOrEmpty(schema.RootName) ? String.Empty : schema.RootName;

            //            this.QualifiedName = schema.AssemblyQualifiedName;
            if (this.rootName.Length > 0)
            {
                this.QualifiedName = String.Format("{0},{1}#{2}", schema.AssemblyQualifiedName, schema.TargetNameSpace,
                                                   schema.RootName);
            }
            else
            {
                this.QualifiedName = String.Format("{0},{1}", schema.AssemblyQualifiedName, schema.TargetNameSpace);
            }
        }