Is there a way to exclude a field for SOAP call?http://forums.asp.net/t/1729729.aspx/1?Is+there+a+way+to+exclude+a+field+for+SOAP+call+Fri, 14 Oct 2011 01:36:33 -040017297294636469http://forums.asp.net/p/1729729/4636469.aspx/1?Is+there+a+way+to+exclude+a+field+for+SOAP+call+Is there a way to exclude a field for SOAP call? <p>I have webservice that returns a list of a object, this object contains a field like below</p> <p>public Object Owner = null;</p> <p>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.</p> <p>&nbsp;</p> <p>Any idea how to do that? thanks</p> 2011-10-12T20:38:31-04:004638286http://forums.asp.net/p/1729729/4638286.aspx/1?Re+Is+there+a+way+to+exclude+a+field+for+SOAP+call+Re: Is there a way to exclude a field for SOAP call? <p>Hi,</p> <p><br> 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.</p> <p><a href="http://sharpertutorials.com/serialization/">http://sharpertutorials.com/serialization/</a><br> <a href="http://www.codeproject.com/KB/XML/Serialization_Samples.aspx">http://www.codeproject.com/KB/XML/Serialization_Samples.aspx</a></p> <p>&nbsp;</p> <p>Best regards,<br> Peter</p> 2011-10-14T01:36:33-04:00