title: Web Service interface - Complex Type as parameter?
body: <p>Just looking for some feedback on best-practices regarding Web Service interface design.</p>
  
  <p>I have two options:</p>
  
  <p><strong>Option 1</strong></p>
  
  <pre><code>public string GetSomeData(SomeCriteriaClass criteria);
  </code></pre>
  
  <p>where SomeCriteriaClass is defined as:</p>
  
  <pre><code>public int ID;
  public string Name;
  public string Property2; etc.
  </code></pre>
  
  <p><strong>Option 2</strong></p>
  
  <pre><code>public string GetSomeData(int id, string name, string property2)
  </code></pre>
  
  <p>Which is the preferred option?  It seems like a conflict of design patterns - 1 is to wrap up parameters in a class, but the other is keeping the web service interface flexible and open.</p>
  
  <p>The second question is - if we choose Option1 - how do you call this via a URL?</p>
  
  <p>Thanks</p>