With Java 1.5, Sun provides a new way of setting the http proxy using ProxySelectors.
In essence, you will need to provide your own custom ProxySelector to replace the default. So anything using a URLConnection will automatically use the proxy that is set using the ProxySelector. That means JAX-WS based stubs/proxies will also be able to use ProxySelector for passing traffic through the http proxy.
Sample code for writing your own ProxySelector can be found in the first 1st link. Authentication can be found in the second link.
Links