Hi anupam,
Did you try setting the Proxy Ip and the port explicitly using either the System property in the code or the -D option?
System.setProperty( "proxySet", "true" );
System.setProperty( "http.proxyHost", proxyHostName );
System.setProperty( "http.proxyPort", Integer.toString( proxyHostPort ) );
-- Ashutosh