Last post Oct 14, 2011 01:36 AM by Peter pi - MSFT
Oct 12, 2011 08:38 PM|wyx2000|LINK
I have webservice that returns a list of a object, this object contains a field like below
public Object Owner = null;
When I call the webserice, I get error, but the error gone if I comment out the above code. So I believe it is about serialize of the Owner, I am thinking if I can exclude the Owner from the return of the SOAP call, it will solve the problem.
Any idea how to do that? thanks
Oct 14, 2011 01:36 AM|Peter pi - MSFT|LINK
Try declare the public object Owner as private(e.g: private Object Owner = null;) or to exclude a field using [NonSerialized] attribute. Please refer to the following articles.