WCF: VS2010 confuses system.xml.xmlelement with system.xml.linq.xelement?
Posted
by Chau
on Stack Overflow
See other posts from Stack Overflow
or by Chau
Published on 2010-05-18T08:26:40Z
Indexed on
2010/05/18
8:30 UTC
Read the original article
Hit count: 1749
I have created a WCF service with one method which returns a System.Xml.XmlElement
:
using System.Xml;
...
public XmlElement Execute(...)
{
XmlNode node = ...;
return (XmlElement)node;
}
When I try to access the service deployed on my server
WCFServiceClient service = new WCFServiceClient("WSHttpBinding_IWCFService");
XmlElement node = service.Execute(...);
I get the error:
Cannot implicitly convert type 'System.Xml.Linq.XElement' to 'System.Xml.XmlElement'
Searching my service solution, I cannot see any reference to System.Xml.Linq.XElement
. Is it wrong of me to expect a System.Xml.Xmlelement
or is VS 2010 fooling around with me?
Thanks in advance.
© Stack Overflow or respective owner