views:

211

answers:

1

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.

+1  A: 

You will need to post your code before we can provide some help.

I did a quick search for the final line of the error message in Google and got these 2 pages which might be of help.

http://www.theserverside.net/discussions/thread.tss?thread_id=37823

http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/aa18e76b-0efc-4c5c-be28-5fb578cf47f2/

Kaius
The second link should help, it has all the information needed.
Sunny