Georgi

Georgi

  • NA
  • 1
  • 0

Custom serialize parameters in wcf Web Service method

Oct 20 2009 8:55 AM
Hi, I have this problem. I have WCF .Net web service with GetListOfRequests method: public interface IMyService { [OperationContract] ListOfRequests GetListOfRequests(string par1, string par2, string par3, DateTime par4, DateTime par5, string par6, string par7); } public class MyService : IMyService { public ListOfRequests GetListOfRequests(string par1, string par2, string par3, DateTime par4, DateTime par5, string par6, string par7) { .... web method code here; } } The problem is that when I generate the web service the wsdl schema return this: xs:element minOccurs="0" name="par1" nillable="true" type="xs:string" xs:element minOccurs="0" name="par2" nillable="true" type="xs:string" ... and I want my parameters to be not null like this: xs:element minOccurs="1" name="par1" nillable="false" type="xs:string"