Stephen on Software aka SOS

July 30, 2009

JAX-WS and Http Proxy

Filed under: Programming — Tags: , — sljm @ 11:19 am

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

  1. Java Networking and Proxies
  2. JAX-WS and Http Proxy Authentication

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.