Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 957803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:45:55+00:00 2026-05-16T00:45:55+00:00

I have a web service. A method of this web service, returns WSSonuc class.

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:45:56+00:00Added an answer on May 16, 2026 at 12:45 am

    XDocument isn’t XML serializable. You could substitute XElement instead since this class is marked as IXMLSerializable.

    If you decide to do that, it’s probably important you realize the differences of these two objects. This seems like a good place to start (in addition to the links I placed above to MSDN).

    Alternatively, you could fall back on good ole’ XmlDocument.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web method like this as part of a web service public
I have a web service which returns something of type MyData . public class
I have a web service that contains this method: [WebMethod] public static List<string> GetFileListOnWebServer()
I have a simple web service method that returns a simple java class as
I have a WCF web service method that returns a List<> object and also
I have a Web Service with Just one Web Method that returns a boolean
I have a method in my web service which returns a DataView, I have
I have a web service that accepts and returns a custom class. The problem
I have a web service that returns a simple object: [System.CodeDom.Compiler.GeneratedCodeAttribute(System.Xml, 2.0.50727.4927)] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
Background: I'm invoking a web service method which returns a JSON string. This string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.