Exemplo n.º 1
0
        private static XmlDocument CreateSoapEnvelope(String url, String metodo, String nombreParametroInput, String tipoRequest, BaseElement data)
        {
            if (url.EndsWith(".php"))
            {
                url = url.Substring(0, url.Length - 4);
            }

            XmlDocument soapEnvelop = new XmlDocument();

            soapEnvelop.LoadXml(String.Format(@"<s:Envelope xmlns:s=""http://schemas.xmlsoap.org/soap/envelope/""><s:Body s:encodingStyle=""http://schemas.xmlsoap.org/soap/encoding/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:q2=""http://schemas.xmlsoap.org/soap/encoding/""><q1:{1} xmlns:q1=""{0}""><{2} href=""#id1""/></q1:{1}><q3:{3} id=""id1"" xsi:type=""q3:{3}"" xmlns:q3=""{0}"">{4}</q3:{3}></s:Body></s:Envelope>", url, metodo, nombreParametroInput, tipoRequest, data.Serialize()));

            return(soapEnvelop);
        }