UploadStringCompleted: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmln s:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/ 2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body ><HelloWorldResponse xmlns="http://tempuri.org/"><HelloWorldResult>Hello Karthik mushyam</HelloWorldResult></HelloWorldResponse></soap:Body></soap:Envelope>
static void Main(string[] args) { WebClient client = new WebClient(); string request1 = "<soap:Envelope\r\n xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\r\n xmlns:xsd='http://www.w3.org/2001/XMLSchema'\r\n xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>\r\n <soap:Body><HelloWorld xmlns=\"http://tempuri.org/\"><name>Karthik mushyam</name></HelloWorld></soap:Body></soap:Envelope>"; client.Headers.Add(HttpRequestHeader.ContentType, "text/xml"); client.Headers.Add("SOAPAction", "http://tempuri.org/HelloWorld"); client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted); client.UploadStringAsync(new Uri("http://localhost:52375/MyFirstWebService/Service.asmx"), request1); Console.ReadLine(); } static void client_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e) { Console.WriteLine("UploadStringCompleted: {0}", e.Result); }
XML
HelloWorldResult
XmlDocument doc = new XmlDocument();doc.LoadXml(yourStringResult);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)