Send nullable int from Android to C# web service
<p>I want to call a JSON C# web service that receives the following parameters:</p>

<pre><code>getMensajesByParameters(int param1, int param2, int? param3)
</code></pre>

<p>Notice that the third parameter is defined as a <code>int?</code>? That means that is a "nullable int".</p>

<p>By the other side I am writing an Android application to call the service.
I am sending the parameters like the one described above.</p>

<pre><code>HttpPost postRequest = new HttpPost(PreferenceManager.getDefaultSharedPreferences(actividad.getBaseContext()).getString(actividad.getString(R.string.server_address_key),"") + "getMensajesByParameters");                        

List&lt;NameValuePair&gt; pairs = new ArrayList&lt;NameValuePair&gt;();                                                                     
pairs.add(new BasicNameValuePair("param1", String.valueOf(param1)));
pairs.add(new BasicNameValuePair("param2", String.valueOf(param2)));                
pairs.add(new BasicNameValuePair("param3", null));

postRequest.setEntity(new UrlEncodedFormEntity(pairs,"UTF-8"));                                                                                                     
HttpResponse getResponse = client.execute(postRequest);                          

final int statusCode = getResponse.getStatusLine().getStatusCode();
</code></pre>

<p>Seems like I am doing something wrong by sending null to the nullable parameter like that, because I am getting status code 500.</p>

<p>I would appreciate any help.</p>
