title: Can a WCF service contract have a nullable input parameter?
body: <p>I have a contract defined like this:</p>
  
  <pre><code>[OperationContract]
  [WebGet(UriTemplate = "/GetX?myStr={myStr}&amp;myX={myX}", BodyStyle = WebMessageBodyStyle.Wrapped)]
  string GetX(string myStr, int? myX);
  </code></pre>
  
  <p>I get an exception:
  [InvalidOperationException: Operation 'GetX' in contract 'IMyGet' has a query variable named 'myX' of type 'System.Nullable<code>1[System.Int32]', but type 'System.Nullable</code>1[System.Int32]' is not convertible by 'QueryStringConverter'.  Variables for UriTemplate query values must have types that can be converted by 'QueryStringConverter'.]</p>
  
  <p>could not find anything about this error except the following link:
  <a href="http://blog.rolpdog.com/2007/07/webget-and-webinvoke-rock.html" rel="nofollow noreferrer">http://blog.rolpdog.com/2007/07/webget-and-webinvoke-rock.html</a> which is a little old and not a solution anyway.</p>
  
  <p>any ideas what to do except get rid of the nullable parameter?</p>
  
  <p>thanks.</p>