send JSON android object to .net server
<p>I have .net web service that expect JSON object. This web service has method for return token: </p>

<pre><code>public string GetToken(string username, string password)...
</code></pre>

<p>This is my site url for direct access (when I field manually id, method and params and paste in browser url I receive response )</p>

<pre><code>http://mysite.com/JsonRPC.aspx?id={0}&amp;method={1}&amp;params={2}
</code></pre>

<p>On stackoverflow I found way to create and send JSON object in android , here is example:</p>

<pre><code>HttpPost request = new HttpPost(URL);
        JSONStringer json = new JSONStringer()
        .object() 
         .key("username").value("username")
         .key("password").value("password")

        .endObject();

        Log.i("json",json.toString());
        StringEntity entity = new StringEntity(json.toString());
                             entity.setContentType("application/json;charset=UTF-8");//text/plain;charset=UTF-8
                             entity.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,"application/json;charset=UTF-8"));
                             request.setEntity(entity); 
                             // Send request to WCF service 
                             DefaultHttpClient httpClient = new DefaultHttpClient();

                             HttpResponse response = httpClient.execute(request);
</code></pre>

<p>My problem is that I don't know how to call my .net web service. What format should be URL variable , where to specific method name , and how to specific method parameters ?</p>

<p>Please give me code </p>

<p>Thanks</p>
