开发者

How to update the data through XML file on server

I am parsing the data from an XML file and storing it in 开发者_运维百科database. Now i want to update the data through an XML file, I have an url for updating the data but i am not getting the way to send the data on that url..

pls help.


              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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜