// Generates SUDS internal void Generate() { Util.Log("SUDSGenerator.Generate"); if (sdlType == SdlType.Sdl) { sdlGenerator.Generate(); } else { wsdlGenerator.Generate(); } }
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); } } }
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)); } } }
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)); } } } }
// Generates SUDS internal void Generate() { Util.Log("SUDSGenerator.Generate"); wsdlGenerator.Generate(); }