You may need to work with your network admin to work out why this is failing. It should be a case of using the following code:
ProxySetup proxySetup = new ProxySetup();
String proxyHost = "myproxy.domain.com";
int proxyPort = 8080 ;
UserCredentials proxyCredentials = new UserCredentials();
proxyCredentials.setUserAccount("userName", "password");
try {
ProxySetup.setupProxy(proxyHost, proxyPort, proxyCredentials);
}
catch (EsriSecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
This doesn't look too far from what you are already trying though.