Search code examples
javaweb-serviceswsdljax-wswsimport

How do I tell wsimport to use a proxy exception url


I need to connect to an internal intranet web service. My company uses a proxy server to access the internet but intranet sites do not go through the proxy. I can navigate to the WSDL in IE and Firefox but I have to add the address to the proxy exception list in both browsers.

When I use wsimport I cannot get the WSDL because of the proxy server. Adding in or leaving out the -httpproxy arg gives me an error "Unable to tunnel through proxy" so I'm guessing this is not the way I need to do it.

Does anyone know a way I can tell wsimport to ignore the proxy server for this url?

Neil


Solution

  • I found the answer. You need to add the following as a JVM parameter and it uses the Internet Explorer (or Safari on Mac I assume) proxy address and exclusion list.

    -Djava.net.useSystemProxies=true
    

    I got the anser from http://jeannotsweblog.blogspot.co.uk/2009/06/wsimport-with-proxy.html