Beispiel #1
0
        public string UploadFile()
        {
            var requestContent = GetRequestContentAsString();
            var xml            = requestContent
                                 .Replace("&lt;", "<")
                                 .Replace("&gt;", ">")
                                 .Replace("&#xD;", "");
            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");
        }