问题
I have made a web service client importing a third party wsdl in eclipse.
But I got this exception:
javax.xml.ws.WebServiceException: Connection IO Exception. Check nested exception for details. (Unable to connect to 1X.XXX.X.XX:X0 - Connection timed out).
I hope this exception occurred for the proxy only.
There is a proxy server between me and that third party. I don't know how to do the proxy authentication and where in coding I need to this proxy authentication.
回答1:
Is your end point on HTTPS? There different ways proxies support HTTPS - one ways is SSL bridging and the other is SSL Tunneling..
May be your client side libraries you used to connect may not support the one being used by the proxy...
回答2:
You must explicitly set the proxy server in Java, the JRE does not retrieve it from the OS configuration. You can find the detailed explanation here. As per the link, a standard configuration may look like this:
System.setProperty("http.proxyHost", "myproxy.com");
System.setPropery("http.proxyPort", "8080");
Obviously, you can also define the system properties as VM arguments during startup.
来源:https://stackoverflow.com/questions/7515604/client-webservice-in-java-proxy-authentication