I am trying to connect to an external server from Java (JDK5) server, though proxy.
https://docs.oracle.com/javase/7/docs/technotes/guides/net/proxies.html (3rd section).
java.net.Proxy proxy = new java.net.Proxy(java.net.Proxy.Type.HTTP, new java.net.InetSocketAddress("WHQPROXYPOOL", 80));
java.net.HttpURLConnection con = (java.net.HttpURLConnection) new java.net.URL("https://performancemanager8.successfactors.com/odata/v2/FOPayGroup?$format=json").openConnection(proxy);
But I am getting error, "UnsupportedOperationException, Method not implemented". When I check Java class (JDK5) URLStreamHandler
protected URLConnection openConnection(URL u, Proxy p) throws IOException {
throw new UnsupportedOperationException("Method not implemented.");
}
How can I connect to target server through proxy?