static void Main1(string[] args) { WebServiceTest client = null; try { client = new WebServiceTest(); client.Run(); } catch (Exception ex) { Error(ex); } Console.WriteLine("Press [Enter] to continue..."); Console.ReadLine(); // //....................................... // // XmlDocument doc = new XmlDocument(); // doc.Load("../../xml/wss4r-signed.xml"); // XmlNodeList list = doc.GetElementsByTagName("Body", "http://schemas.xmlsoap.org/soap/envelope/"); // //XmlNodeList list = doc.GetElementsByTagName("SignedInfo", "http://www.w3.org/2000/09/xmldsig#"); // XmlDocument docPart = new XmlDocument(); // docPart.LoadXml(list[0].OuterXml); // // Microsoft.Web.Services2.Security.Xml.XmlDsigExcC14NTransform trans = new Microsoft.Web.Services2.Security.Xml.XmlDsigExcC14NTransform(false); // trans.Algorithm = "http://www.w3.org/2001/10/xml-exc-c14n#"; // trans.LoadInput(docPart); // // Stream res = (Stream)trans.GetOutput(typeof(Stream)); // Console.WriteLine( new StreamReader( res).ReadToEnd( )); // // res.Seek(0,SeekOrigin.Begin); // Console.WriteLine(res.Length); // FileStream fs = File.Create("../../xml/out.xml"); // string s = (new StreamReader(res).ReadToEnd()); // byte[] outa = new ASCIIEncoding().GetBytes(s); // // // fs.Write(outa, 0, outa.Length); // fs.Flush(); // fs.Close(); // res.Seek(0,SeekOrigin.Begin); // SHA1 sha1 = SHA1.Create(); // // byte[] hash = sha1.ComputeHash(res); // Console.WriteLine(Convert.ToBase64String(hash)); // // Console.ReadLine(); }