If you want to access a remote web service, but your system is behind a firewall or you use a proxy server, you need to configure the IDE with your proxy settings. For working with remote web services, setting a proxy can be important in one or more of the following areas:
The proxy settings for each of the situations above are described below.
To retrieve the WSDL file in the Web Service Client wizard:
Typically, an error such as the following is displayed in the Web Service Client wizard when the proxy settings for retrieving a WSDL file have not been set correctly:
Download failed. I/O exception: (Check the proxy settings.)
Do the following to check and set the proxy:
The changes take effect when you click OK.
To use the IDE to test the web service:
Typically, an error such as the following is returned when the proxy settings for testing a web service from the IDE have not been set correctly:
org.netbeans.modules.websvc.registry.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:449)
Do the following to check and set the proxy:
The changes take effect when you exit the Options window.
To deploy to the Sun Java System Application Server:
Typically, an error such as the following is returned when the proxy settings for a web service or web service client deployed to the Sun Java System Application Server have not been set correctly:
java.rmi.RemoteException: HTTP transport error: java.net.UnknownHostException:
Do the following to check and set the proxy:
-Dhttp.proxyHost=your.proxy.host
-Dhttp.proxyPort=your.proxy.port.number
Stop and then restart the server for the new proxy settings to take effect.
To deploy to the JBoss Server:
Typically, nothing is displayed in the browser when the proxy settings for a web service or web service client deployed to JBoss have not been set correctly.
Do the following to check and set the proxy:
Stop and then restart the server for the new proxy settings to take effect.
To deploy to the Tomcat Web Server:
Typically, nothing is displayed in the browser when the proxy settings for a web service or web service client deployed to JBoss have not been set correctly.
Do the following to check and set the proxy:
-Dhttp.proxyHost=your.proxy.host
-Dhttp.proxyPort=your.proxy.port
Start the server for the new proxy settings to take effect.
To deploy a web service client in a Java application:
Typically, an error such as the following is returned when the proxy settings for a web service or web service client deployed from a Java application have not been set correctly:
java.rmi.RemoteException: HTTP transport error: java.net.UnknownHostException:
Do the following to check and set the proxy:
-Dhttp.proxyHost=your.proxy.host -Dhttp.proxyPort=your.proxy.port
The changes take effect when you click OK.
Note that for client deployment from Java applications, you must set the proxy for each project, because each Java application runs as a stand-alone JVM process and each can provide different JVM parameters. For web applications sharing the same instance of a server, you need set the proxy only once -- on the server itself, as described above.