This text file contains example code from: Chapter 9 - Service-Orientation with .NET Part I: Service Contracts and Interoperability Book - SOA with .NET & Windows Azure: Realizing Service-Orientation with the Microsoft Platform Series - Prentice Hall Service-Oriented Computing Series from Thomas Erl (www.soabooks.com/community) Certification - These examples are used as part of the Certified SOA .NET Developer curriculum (www.soaschool.com) <programlisting linenumbering="unnumbered">Message messageOut = channel.Request(messageIn); XmlReader readResponse = messageOut.GetReaderAtBodyContents(); XmlDocument doc = new XmlDocument(); doc.Load(readResponse); var xDoc = XDocument.Parse(doc.OuterXml); XNamespace xmlns2 = xDoc.Root.Attribute("xmlns").Value; <?docpage num="272"?>var transformed = from d in xDoc.Descendants (xmlns2 + "personElement") select new Customer { firstName = d.Element(xmlns2 + "foreName").Value, lastName = d.Element(xmlns2 + "surName").Value, id = Convert.ToInt32(d.Element(xmlns2 + "id").Value), gender = (Customer.genderType) Enum.Parse(typeof(Customer.genderType), d.Element(xmlns2 + "gender").Value), phone = d.Element(xmlns2 + "address"). Element(xmlns2 + "phonenr").Value, };</programlisting> </example>