Bonjour,

Je sais pas comment faire fonctionner ce programme pour récupérer un fichier xml du serveur web.

public class test {
public static void main(String[] args) throws UnknownHostException, IOException{
String url = "http://feeds.feedburner.com/figaro-international";
String proxy = "172.16.86.98";
String port = "8080";
URL server = new URL(url);
Properties systemProperties = System.getProperties();
systemProperties.setProperty("http.proxyHost",proxy);
systemProperties.setProperty("http.proxyPort",port);
HttpURLConnection connection = (
HttpURLConnection)server.openConnection();
connection.connect();
InputStream in = connection.getInputStream();
in.read();
connection.disconnect();
}
}

Merci pour votre aide