String urlStr = "http://172.16.1.21/customServiceAction.domethod=searchCustomServciesForWebJydt";
        httpConn = (HttpURLConnection) new URL(urlStr).openConnection();
        int responseCode = httpConn.getResponseCode();
        if(responseCode == HttpURLConnection.HTTP_OK){
        BufferedReader br = new BufferedReader(new InputStreamReader(httpConn.getInputStream()));
        String sCurrentLine = "";  
           String sTotalString = "";  
        while((sCurrentLine = br.readLine()) != null){
        sTotalString += sCurrentLine;
        }
        System.out.println("返回的xml为:"+sTotalString);返回xml文件中 中文乱码 如 <realName>閭鐞?</realName>
接口返回xml中的设置是utf8的 我这边相当于前台调用 试过各种编码转换sTotalString = new String(sTotalString.getBytes("ISO8859-1"),"UTF-8"); 都没用 已经折磨了我一天了 希望高手能帮我下