public frmMethodDescription(Capacity capacity)
        {
            InitializeComponent();

            this.capacity = capacity;

            this.txtObservaciones.Text = this.capacity.Documentation;
        }
 public frmParametersCreator(Capacity capacity, WSDLManager wsdlManager, ParametersType parametersType)
 {
     InitializeComponent();
     this.capacity = capacity;
     this.bOs = wsdlManager.BussinesObjects;
     this.wsdlManager = wsdlManager;
     this.parametersType = parametersType;
     CargarBOs();
     LoadContainers();
 }
예제 #3
0
        public Capacity getCapacity(string name)
        {
            Capacity capacity = null;

            foreach (var item in this.methods)
            {
                if (item.Name.ToUpper().Equals(name.ToUpper()))
                {
                    capacity = item;
                    break;
                }
            }

            return(capacity);
        }
예제 #4
0
        public void LoadWSDL(XmlDocument doc)
        {
            XmlNodeList nodes = doc.GetElementsByTagName("service");

            if (nodes.Count > 0)
            {
                this.serviceName   = nodes[0].Attributes.GetNamedItem("name").Value;
                this.Type          = this.ParseEnum <ServiceType>(nodes[0].Attributes.GetNamedItem("type").Value);
                this.Domain        = nodes[0].Attributes.GetNamedItem("domain").Value;
                this.Documentation = nodes[0].ChildNodes[0].InnerText;

                XmlNode         schemas = nodes[0].ChildNodes[2];
                BussinessObject bo      = null;

                foreach (XmlNode item in schemas.ChildNodes)
                {
                    bo = new BussinessObject();

                    bo.Name      = item.Attributes.GetNamedItem("name").Value;
                    bo.Path      = item.Attributes.GetNamedItem("path").Value;
                    bo.NameSpace = item.Attributes.GetNamedItem("namespace").Value;

                    if (item.Attributes.GetNamedItem("domain") != null)
                    {
                        bo.Domain = item.Attributes.GetNamedItem("domain").Value;
                    }

                    if (item.Attributes.GetNamedItem("isExtern") != null)
                    {
                        bo.IsExtern = Boolean.Parse(item.Attributes.GetNamedItem("isExtern").Value);
                    }

                    this.BussinesObjects.Add(bo);
                }

                XmlNode methods = nodes[0].ChildNodes[1];

                Capacity  method;
                Parameter param = null;

                foreach (XmlNode item in methods.ChildNodes)
                {
                    method = new Capacity();

                    method.Name          = item.Attributes.GetNamedItem("name").Value;
                    method.Documentation = item.Attributes.GetNamedItem("description").Value;

                    if (item.ChildNodes[0] != null)
                    {
                        foreach (XmlNode parameter in item.ChildNodes[0].ChildNodes)
                        {
                            param = ConfigParameter(parameter);
                            method.ParametersIn.Add(param);
                        }
                    }

                    if (item.ChildNodes[1] != null)
                    {
                        foreach (XmlNode parameter in item.ChildNodes[1].ChildNodes)
                        {
                            param = ConfigParameter(parameter);
                            method.ParametersOut.Add(param);
                        }
                    }

                    this.methods.Add(method);
                }
            }
            else
            {
                throw new Exception("Archivo no valido.");
            }
        }