title: How to specify a parameter of an OperationContract as required
body: <p>I wonder how I can specify a parameter of an OperationContract method in WCF as required so that the generated xsd contains minOccurs="1" instead of minOccurs="0".</p>
  
  <p>Example:</p>
  
  <pre><code>[ServiceContract(Namespace = "http://myUrl.com")]  
  public interface IMyWebService  
  {  
     [OperationContract]  
     string DoSomething(string param1, string param2, string param3);  
  }
  </code></pre>
  
  <p>generates this xsd:  </p>
  
  <pre><code>&lt;xs:element name="DoSomething"&gt;  
    &lt;xs:complexType&gt;  
      &lt;xs:sequence&gt;  
        &lt;xs:element minOccurs="0" name="param1" nillable="true" type="xs:string" /&gt;  
        &lt;xs:element minOccurs="0" name="param2" nillable="true" type="xs:string" /&gt;  
        &lt;xs:element minOccurs="0" name="param3" nillable="true" type="xs:string" /&gt;  
      &lt;/xs:sequence&gt;  
    &lt;/xs:complexType&gt;  
  </code></pre>
  
  <p>  </p>
  
  <p>But I want to define minOccurs="1" within the code without the necessity to manually fix it in the xsd file.</p>