public string UploadFile() { var requestContent = GetRequestContentAsString(); var xml = requestContent .Replace("<", "<") .Replace(">", ">") .Replace("
", ""); var xmlDoc = new XmlDocument(); xmlDoc.LoadXml(xml); var soapBody = xmlDoc.GetElementsByTagName("s:Body")[0]; var deserializer = new XmlSerializer(typeof(SendPmReadOut)); var report = (SendPmReadOut)deserializer.Deserialize(new MemoryStream(Encoding.Default.GetBytes(soapBody.InnerXml))); _sqlRepository.AddReport(report); //var fileData = LastFileData(); return("ok"); }