Exemplo n.º 1
0
 // Generates SUDS
 internal void Generate()
 {
     Util.Log("SUDSGenerator.Generate");
     if (sdlType == SdlType.Sdl)
     {
         sdlGenerator.Generate();
     }
     else
     {
         wsdlGenerator.Generate();
     }
 }
Exemplo n.º 2
0
        public void Generate() // konstruktorVsfuggvenyPara namespaces imports
        {
            this.PrepareGeneration();
            if (this.diagnostics.HasAnyErrors())
            {
                return;
            }
            if (this.SingleFileWsdl)
            {
                this.SeparateXsdWsdl = false;
            }
            string xsdDirectory  = Path.Combine(this.OutputDirectory, "xsd");
            string wsdlDirectory = Path.Combine(this.OutputDirectory, "wsdl");

            if (this.SeparateXsdWsdl)
            {
                Directory.CreateDirectory(xsdDirectory);
            }
            else
            {
                xsdDirectory = wsdlDirectory;
            }
            Directory.CreateDirectory(wsdlDirectory);

            var namespaces = this.Model.Symbols.OfType <Namespace>().Where(ns => ns.Uri != null).ToList();

            foreach (var ns in namespaces)
            {
                if (ns.Uri != null)
                {
                    if (!this.SingleFileWsdl)
                    {
                        string xsdFileName = Path.Combine(xsdDirectory, ns.FullName + ".xsd");
                        using (StreamWriter writer = new StreamWriter(xsdFileName))
                        {
                            XsdGenerator xsdGen = new XsdGenerator(ns);
                            writer.WriteLine(xsdGen.Generate(ns));
                        }
                    }
                    string wsdlFileName = Path.Combine(wsdlDirectory, ns.FullName + ".wsdl");
                    using (StreamWriter writer = new StreamWriter(wsdlFileName))
                    {
                        WsdlGenerator wsdlGen = new WsdlGenerator(ns);
                        wsdlGen.Properties.SingleFileWsdl  = this.SingleFileWsdl;
                        wsdlGen.Properties.SeparateXsdWsdl = this.SeparateXsdWsdl;
                        writer.WriteLine(wsdlGen.Generate(ns));
                    }

                    JavaEeGenerationHelper.GenerateJavaEe(ns, this.OutputDirectory);
                }
            }
        }
Exemplo n.º 3
0
        public void Generate()
        {
            this.PrepareGeneration();
            if (this.diagnostics.HasAnyErrors())
            {
                return;
            }
            if (this.SingleFileWsdl)
            {
                this.SeparateXsdWsdl = false;
            }
            string xsdDirectory  = Path.Combine(this.OutputDirectory, "xsd");
            string wsdlDirectory = Path.Combine(this.OutputDirectory, "wsdl");

            if (this.SeparateXsdWsdl)
            {
                Directory.CreateDirectory(xsdDirectory);
            }
            else
            {
                xsdDirectory = wsdlDirectory;
            }
            Directory.CreateDirectory(wsdlDirectory);

            var namespaces = this.Model.Symbols.OfType <Namespace>().Where(ns => ns.Uri != null).ToList();

            foreach (var ns in namespaces)
            {
                if (ns.Uri != null)
                {
                    if (!this.SingleFileWsdl)
                    {
                        string       xsdFileName = Path.Combine(xsdDirectory, ns.FullName + ".xsd");
                        XsdGenerator xsdGen      = new XsdGenerator(ns);
                        File.WriteAllText(xsdFileName, xsdGen.Generate(ns));
                    }
                    string        wsdlFileName = Path.Combine(wsdlDirectory, ns.FullName + ".wsdl");
                    WsdlGenerator wsdlGen      = new WsdlGenerator(ns);
                    wsdlGen.Properties.SingleFileWsdl  = this.SingleFileWsdl;
                    wsdlGen.Properties.SeparateXsdWsdl = this.SeparateXsdWsdl;
                    File.WriteAllText(wsdlFileName, wsdlGen.Generate(ns));
                }
            }
        }
Exemplo n.º 4
0
        public void Generate()
        {
            this.PrepareGeneration();
            if (this.Diagnostics.HasErrors()) return;
            if (this.SingleFileWsdl)
            {
                this.SeparateXsdWsdl = false;
            }
            string xsdDirectory = Path.Combine(this.OutputDirectory, "xsd");
            string wsdlDirectory = Path.Combine(this.OutputDirectory, "wsdl");
            if (this.SeparateXsdWsdl)
            {
                Directory.CreateDirectory(xsdDirectory);
            }
            else
            {
                xsdDirectory = wsdlDirectory;
            }
            Directory.CreateDirectory(wsdlDirectory);

            var namespaces = this.Model.Instances.OfType<Namespace>().ToList();
            foreach (var ns in namespaces)
            {
                if (ns.Uri != null)
                {
                    if (!this.SingleFileWsdl)
                    {
                        string xsdFileName = Path.Combine(xsdDirectory, ns.FullName + ".xsd");
                        using (StreamWriter writer = new StreamWriter(xsdFileName))
                        {
                            XsdGenerator xsdGen = new XsdGenerator(ns);
                            writer.WriteLine(xsdGen.Generate(ns));
                        }
                    }
                    string wsdlFileName = Path.Combine(wsdlDirectory, ns.FullName + ".wsdl");
                    using (StreamWriter writer = new StreamWriter(wsdlFileName))
                    {
                        WsdlGenerator wsdlGen = new WsdlGenerator(ns);
                        wsdlGen.Properties.SingleFileWsdl = this.SingleFileWsdl;
                        wsdlGen.Properties.SeparateXsdWsdl = this.SeparateXsdWsdl;
                        writer.WriteLine(wsdlGen.Generate(ns));
                    }
                }
            }
        }
Exemplo n.º 5
0
 // Generates SUDS
 internal void Generate()
 {
     Util.Log("SUDSGenerator.Generate");
     wsdlGenerator.Generate();
 }