.net - How to use LINQ with ServiceModel.Channels.Message -


How can I use LINM with the service model? Channel. message? I want LINQ to use SOAP message body.

I tried to do this initially:

  XElement elem = XElement.load (message.GetReaderAtBodyContents ());  

But the piece of code complains that XMLReader should have EOF after the reading process. What is the right way to do this?

OK, I think I found a solution:

  XDocument Document = XDocument.Parse (message.GetReaderAtBodyContents (). ReadOuterXml ());  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -