hi there,
I have a web service. A method of this web service, returns WSSonuc class.
[Serializable]
public class WSSonuc
{
public int M_Durum { get; set; }
public object M_SonucNesne { get; set; }
}
this is my Web service method:
[WebMethod]
[SoapHeader("_ticket", Direction = SoapHeaderDirection.InOut)]
public WSSonuc f_Dummy()
{
WSSonuc ws = new WSSonuc();
ws.M_Durum = 1;
ws.M_SonucNesne = new XDocument();
return ws;
}
I have an exception from web site when i call f_Dummy; Exception is :
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: The type System.Xml.Linq.XDocument was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.