title: Optional query string parameters in URITemplate in WCF?
body: <p>I'm developing some RESTful services in WCF 4.0. I've got a method as below:</p>
  
  <pre><code>[OperationContract]
      [WebGet(UriTemplate = "Test?format=XML&amp;records={records}", ResponseFormat=WebMessageFormat.Xml)]
      public string TestXml(string records)
      {
          return "Hello XML";
      }
  </code></pre>
  
  <p>So if i navigate my browser to <a href="http://localhost:8000/Service/Test?format=XML&amp;records=10" rel="noreferrer">http://localhost:8000/Service/Test?format=XML&amp;records=10</a>, then everything works as exepcted.</p>
  
  <p>HOWEVER, i want to be able to navigate to <a href="http://localhost:8000/Service/Test?format=XML" rel="noreferrer">http://localhost:8000/Service/Test?format=XML</a> and leave off the "&amp;records=10" portion of the URL. But now, I get a service error since the URI doesn't match the expected URI template.</p>
  
  <p>So how do I implement defaults for some of my query string parameters? I want to default the "records" to 10 for instance if that part is left off the query string.</p>