title: Target host must not be null or set in parameters.scheme=null,host=null
body: <p>i am getinng the following exception:</p>
  
  <pre><code>    Target host must not be null or set in parameters.scheme=null,
  host=null,path=/webservices/tempconvert.asmx/FahrenheitToCelsius
  </code></pre>
  
  <p>My source code:</p>
  
  <pre><code>public class ParActivity extends Activity {
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          TextView t=new TextView(this);
          String encodedUrl = null;
        //  setContentView(R.layout.main);
  
                  HttpClient client = new DefaultHttpClient();  
                 //String query = "?Fahrenheit=26";
              //  String host = "www.w3schools.com/webservices/tempconvert.asmx/";
              //   encodedUrl = host + URLEncoder.encode(query,"utf-8");
              //  int p=(Integer) null;
                // URI uri = URIUtils.createURI("vv", "www.w3schools.com", 50, "/webservices/tempconvert.asmx", "?Fahrenheit=26", null);
  
                  try{ 
                 String postURL = "/webservices/tempconvert.asmx/FahrenheitToCelsius";
                  HttpPost post = new HttpPost(postURL);
                // post.addHeader("scheme","vv");
                 // post.setHeader("host", "www.w3schools.com");
                  String PostData="36";
                  StringEntity httpPostEntity = new StringEntity(PostData, HTTP.UTF_8);
                  post.setEntity(httpPostEntity);
                  post.setHeader("host", "www.w3schools.com");
                  post.setHeader("Content-Length", new Integer(PostData.length()).toString());
                  post.setHeader("Content-Type", "application/x-www-form-urlencoded");
  
  
                  List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2);
                 // nameValuePairs.add(new BasicNameValuePair("host", "www.w3schools.com"));
                  nameValuePairs.add(new BasicNameValuePair("Fahrenheit", "26"));
                 post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  
  
                 HttpResponse responsePOST = null;
                  // Execute HTTP Post Request
                 // HttpResponse response = httpclient.execute(post);
                  client.getConnectionManager();
  
  
  
                     responsePOST = client.execute(post); 
                  HttpEntity resEntity = responsePOST.getEntity();  
                  String response=EntityUtils.toString(resEntity);
                  response=response.trim();
                //  Log.i("RESPONSE=",response);
                  t.setText("response"+response);
                  setContentView(t);
          } catch (Exception e) {
              // TODO Auto-generated catch block
             //e.printStackTrace();
              t.setText("ex"+e.getMessage());
          setContentView(t);
          }
      }
  
  }
  </code></pre>
  
  <p>i want to invoke the webservice at:
  <a href="http://www.w3schools.com/webservices/tempconvert.asmx?op=CelsiusToFahrenheit" rel="noreferrer">http://www.w3schools.com/webservices/tempconvert.asmx?op=CelsiusToFahrenheit</a></p>
  
  <p>using HttpClient.How should i give host and scheme as input?</p>
  
  <p>please help...</p>