You forget to set the properties back to System before you instantiate URL
java.util.Properties prop = System.getProperties(); prop.put("proxySet","true"); prop.put("http.proxyHost","proxy.mycompany.com"); prop.put("http.proxyPort","8080");
System.setProperties(prop);
URL url = new URL("http://myService/services/myServicePort"); URLConnection conn = url.openConnection();
String password = "user

ass"; String auth = "Basic " + new sun.misc.BASE64Encoder().encode(password.getBytes()); conn.setRequestProperty( "Proxy-Authorization", auth); System.out.println( "Url Connection opened"); conn.connect(); WsEmployeeServicePortType ws = new WsEmployeeServiceLocator().getWsEmployeeServicePort(conn.getURL());