2011-07-06 13 views

答えて

1
   List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(4); 
    nameValuePairs.add(new BasicNameValuePair("latitude", "00.11")); 
    nameValuePairs.add(new BasicNameValuePair("longitude", "00.11")); 
    String url = "http://10.15.66.101:8080/LocationServer/GetLocation"; 

      HttpClient httpClient = new DefaultHttpClient(); 

    HttpPost httpPost = new HttpPost(
      url); 

    httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); 

    // Execute HTTP Post Request 
    HttpResponse response = httpClient.execute(httpPost); 

    BusinessManager.getHandler().getLoggerUtilityObj().printMsg(
      "Posting data to server"); 
    // This is done to shutdown the previously open http connection 
    httpClient.getConnectionManager().shutdown(); 
関連する問題