Thursday, February 17, 2011

Error in getting a custom object inherited from a base class using web method ASP.NET

Hi

I have created a base class A and a class B is a derived class inherited from class A. Both classes are marked as Serialized. When I try to return an object of type B through a web method i am getting following error:

System.Web.Services.Protocols.SoapException: 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 CSI.API.RPartyMembershipInfo was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.

Any help would be appreciated.

From stackoverflow

0 comments:

Post a Comment