Issue with upload data in android
<p>I need to upload icon image file to server here i have try it but when i print response ::
i have use <code>HTTP POST</code> method ::</p>

<pre><code>11-09 08:13:10.953: INFO/System.out(15034): entityorg.apache.http.conn.BasicManagedEntity@44eebcf8
11-09 08:13:10.953: INFO/System.out(15034): entityorg.apache.http.message.BasicHttpResponse@44eea688
11-09 08:13:10.953: INFO/System.out(15034): isorg.apache.http.conn.EofSensorInputStream@44eec600
</code></pre>

<p><strong>Here is my code ::</strong> </p>

<pre><code>Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(),R.drawable.icon);
ByteArrayOutputStream bao = new ByteArrayOutputStream();
bitmapOrg.compress(Bitmap.CompressFormat.JPEG, 90, bao);
byte [] ba = bao.toByteArray();
String ba1=Base64.encodeToString(ba, 1);
ArrayList&lt;NameValuePair&gt; nameValuePairs = new
ArrayList&lt;NameValuePair&gt;();
nameValuePairs.add(new BasicNameValuePair("Content-Type","application/soap+xml"));
nameValuePairs.add(new BasicNameValuePair("ImgIn",ba1));

try {
    HttpClient httpclient = new DefaultHttpClient();
    HttpPost httppost = new
    HttpPost("http://192.168.1.20/Webservices/Service.asmx/PutImage");
    httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
    HttpResponse response = httpclient.execute(httppost);
    HttpEntity entity = response.getEntity();
    System.out.println("entity"+entity);
    System.out.println("entity"+response);
    is = entity.getContent();
    System.out.println("is"+is);
} catch(Exception e){
    Log.e("log_tag", "Error in http connection "+e.toString());
}
</code></pre>
