I am using the below code snippet now to deserialize the XML document ...
[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;
}
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
There is an error in XML document (1, 2). ---> System.InvalidOperationException: http://ConsureWebService.Order'> was not expected.