Answer: Yes. Internally the REST Service Call Builder uses the Java HttpURLConnection class to connect to the remote server. The Java runtime provides a set of system properties that can be set to force the HTTP request to go through a proxy.
The two primary settings are:
- http.proxyHost - This is used to specify the host name of the HTTP proxy server.
- http.proxyPort - This is used to specify the port number on the HTTP proxy host.
Depending on your environment you may need to enable this on you application server, and your Eclipse IDE.
Application Server
Depending on your application server the way you set these may vary.
On Tomcat you can add these setting to the conf\catalina.properties file.
Example:
http.proxyHost=myproxy
http.proxyPort=8080
On WAS CE you can add them to the JAVA_OPTS in the WebSphere\AppServerCommunityEdition\bin\setenv.bat file.
Example:
if "%JAVA_OPTS%" == "" set JAVA_OPTS=-Xms32m -Xmx256m "-Djava.endorsed.dirs=%GERONIMO_BASE%/lib/endorsed;%JRE_HOME%/lib/endorsed" -Dhttp.proxyHost=myproxy -Dhttp.proxyPort=8080
On WAS you can set these Java properties using the WAS admin console.
Eclipse IDE
If the REST Service Call Builder is setup to fetch the schema at design time using sample data then you will have to make the proxy setting for your IDE environment.
Depending on how you launch Eclipse you can add the proxy settings as vmargs in the eclipse.ini file.
Example:
-vmargs
-Xmx512M
-Dhttp.proxyHost=myproxy
-Dhttp.proxyPort=8080
-Dhttp.proxySet=true
Or you can add them directly to the command line.
Example:
eclipse.exe -vmargs -Xmx512M -Dhttp.proxyHost=myproxy -Dhttp.proxyPort=8080 -Dhttp.proxySet=true
Note - For some reason Eclipse seems to intermittently clear out these settings from the System Properties due to their use by the Update Manager. To resolve this you need to the Eclipse Preferences -> Install/Update page. You should see the proxy setting already set, so you just need to hit Apply. You may need to do this each time you start Eclipse.
Caveat - If you are using Java 1.5 or higher you will need to set the Timeout to 0 in the REST Service Call Builder in order to use a proxy. This is due to an incompatibility between the versions, and a custom timeout class. This will be fixed in the next major release of the Factory.