title: HttpResponse return org.appache.http.conn.BasicManagedEntity when sending data to wcf
body: <p>I have an android app that send data through WCF to my database. when i send basic data such as string the app work fine , but when i add the conversion of the image from byte array to Base64 the HttpResponse return <code>org.appache.http.conn.BasicManagedEntity</code></p>
  
  <p>NB: I tried the code it works fine just once, but since then it has stopped. i dont know why. when i remove the converted picture to string , it work but when i add it to the code i does not work.</p>
  
  <pre><code>            JSONObject jsonPost = new JSONObject();
              jsonPost.put("FirstName", params[5]);
              jsonPost.put("LastName", params[6]);
              jsonPost.put("MemberPicture", params[7]);
              //send the details                          
              result = WebRequest.SendHttpPost("RegisterMember", jsonPost);
  </code></pre>
  
  <p>SendHttpPost method takes the method name and the parameters as JSONObject</p>
  
  <pre><code>        public static String SendHttpPost(String method, JSONObject jsonObjSend) {
  
          String resultString = null;
  
          try {
  
              DefaultHttpClient httpclient = new DefaultHttpClient();
              HttpPost httpPostRequest = new HttpPost(URL.concat(method));
  
              StringEntity se;
              se = new StringEntity(jsonObjSend.toString());
  
              // Set HTTP parameters
              httpPostRequest.setEntity(se);
              httpPostRequest.setHeader("Accept", "application/json");
              httpPostRequest.setHeader("Content-type", "application/x-www-form-urlencoded");
  
              HttpResponse response = httpclient.execute(httpPostRequest);
  
              // Get hold of the response entity (-&gt; the data):
              HttpEntity entity = response.getEntity();
  
              General.setMessage(entity.toString());
  
                  // Read the content stream
                  InputStream instream = entity.getContent();
                  // convert content stream to a String
                  resultString = convertStreamToString(instream);
                  instream.close();
  
                  return resultString;
          }
          catch (Exception e)
          {
              e.printStackTrace();
          }
  
          return null;
      }
  </code></pre>
  
  <p>I added this one to my wcf web service</p>
  
  <pre><code> &lt;bindings&gt;
    &lt;!-- pick whichever binding you want .... --&gt;
    &lt;basicHttpBinding&gt;
       &lt;!-- binding configuration with a name --&gt;
       &lt;binding name="ExtendedMaxSize"  
           maxBufferSize="999999999" maxReceivedMessageSize="9999999999999999" /&gt;
    &lt;/basicHttpBinding&gt;
  </code></pre>
  
  <p></p>
  
  <p>T</p>
  
  <p>But the code is not working, so i need some help about that .</p>
  
  <p>thank you</p>