string ssssss = OperationContext.Current.RequestContext.RequestMessage.GetReaderAtBodyContents().ToString(); try { xmlDocument.LoadXml(ssssss); xmlNodeList = xmlDocument.SelectNodes("//COUNTRY_ID"); if (xmlNodeList.Count > 0) getPinRequest.COUNTRY_ID = xmlNodeList[0].InnerText.Trim(); else bXMLSerializeFailed = true; xmlNodeList = xmlDocument.SelectNodes("//COUNTRY_NAME"); if (xmlNodeList.Count > 0) getPinRequest.COUNTRY_NAME = xmlNodeList[0].InnerText.Trim(); else bXMLSerializeFailed = true; } catch (Exception ex) { bXMLSerializeFailed = true; throw ex; } O/P:- <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:header> <to soapenv:mustunderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://localhost:51047/Service1.svc</to> <action soapenv:mustunderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">urn:IService1/GET_COUNTRY_DETAILS</action> </soapenv:header> <soapenv:body>... stream ...</soapenv:body> </soapenv:envelope>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)