title: deserialize the XML Document --- Need Help
body: <p>I am using the below code snippet now to deserialize the XML document ... </p>
  
  <pre><code>[WebMethod]
  public XmlDocument OrderDocument(XmlDocument xmlDoc)
  {
     XmlSerializer serializer = new XmlSerializer(typeof(sendOrder.Order));
  
     string xmlString = xmlDoc.OuterXml.ToString();
  
     byte[] buffer = ASCIIEncoding.UTF8.GetBytes(xmlString);
  
     MemoryStream ms = new MemoryStream(buffer);
  
     sendOrder.Order orderDoc = (sendOrder.Order)serializer.Deserialize(ms);
  
     sendOrder.WebService_ConsureWebService ws = 
           new sendOrder.WebService_ConsureWebService();
  
     ws.Operation_1(ref orderDoc);
  
     return xmlDoc;
  }
  </code></pre>
  
  <p>Can anybody please tell what is wrong with the code, as the error says there is an error in the XML document but if you check the document I am passing and the even the Order object its got the same structure and the namespace</p>
  
  <blockquote>
    <p>There is an error in XML document (1,
    2). --->
    System.InvalidOperationException:
    http://ConsureWebService.Order'>
    was not expected.</p>
  </blockquote>