title: How to serialize parameters in Web Service method
body: <p>I have this problem. I have WCF .Net C# web service with this method:</p>
  
  <pre><code>public interface IMyService
  {
      // TODO: Add your service operations here
      [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;
       }
  }
  </code></pre>
  
  <p>The problem is that when I generate the web service the wsdl schema return this:</p>
  
  <pre><code>&lt;xs:element name="GetListOfRequests"&gt;
    &lt;xs:complexType&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element minOccurs="0" name="par1" nillable="true" type="xs:string" /&gt; 
      &lt;xs:element minOccurs="0" name="par2" nillable="true" type="xs:string" /&gt; 
      &lt;xs:element minOccurs="0" name="par3" nillable="true" type="xs:string" /&gt; 
      &lt;xs:element minOccurs="0" name="par4" type="xs:dateTime" /&gt; 
      &lt;xs:element minOccurs="0" name="par5" type="xs:dateTime" /&gt; 
      &lt;xs:element minOccurs="0" name="par6" nillable="true" type="xs:string" /&gt; 
      &lt;xs:element minOccurs="0" name="par7" nillable="true" type="xs:string" /&gt; 
     &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  </code></pre>
  
  <p>and I want my parameters to be not null like this:</p>
  
  <pre><code>&lt;xs:element name="GetListOfRequests"&gt;
    &lt;xs:complexType&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element minOccurs="1" name="par1" nillable="false" type="xs:string" /&gt; 
      &lt;xs:element minOccurs="1" name="par2" nillable="false" type="xs:string" /&gt; 
      &lt;xs:element minOccurs="1" name="par3" nillable="false" type="xs:string" /&gt; 
      &lt;xs:element minOccurs="1" name="par4" type="xs:dateTime" /&gt; 
      &lt;xs:element minOccurs="1" name="par5" type="xs:dateTime" /&gt; 
      &lt;xs:element minOccurs="1" name="par6" nillable="false" type="xs:string" /&gt; 
      &lt;xs:element minOccurs="0" name="par7" nillable="true" type="xs:string" /&gt; 
     &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  </code></pre>
  
  <p>How can I serizalize parameters to achieve this? Thank you in advance for your help.
  Regards,
  Georgi</p>