Skip to main content link. Accesskey S
  • Help
  • IBM Logo
  • IBM Web Experience Factory wiki
  • All Wikis
  • All Forums
  • ANNOUNCEMENT: Wiki changed to read-only. READ MORE...
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • IBM Redbooks
  • API Documentation
Search
  • Share Show Menu▼
  • Subscribe Show Menu▼

About the Original Author

Click to view profileRob Flynn
Contribution Summary:
  • Articles authored: 199
  • Articles edited: 253
  • Comments Posted: 2

Recent articles by this author

JAX-WS Handler Sample using IBM Web Experience Factory

Overview The Web Experience Factory (WEF) 8.0 release contains an enhancement to the web service call builders that gives you an option to define a global JAXWS handler class. This handler makes it possible for models to intercept and process the inbound and outbound SOAP envelopes ...

WebSphere Dashboard Framework 7.0.1.1 Fix pack now available

The WebSphere Dashboard Framework 7.0.1.1 Fix pack has been released.

IBM Web Experience Factory Version 7.0.1.4 Fix Pack is now available

This fix pack includes new fixes and updates for Web Experience Factory Version 7.0.1. and is now available on Fix Central and can be downloaded from here: ...

IBM Web Experience Factory WCAG 2.0 Compliance

IBM Web Experience Factory, developed and tested compliant to WCAG 2.0, can produce output ( web pages , sites and content) that can be WCAG 2.0 Level A and Level AA compliant. IBM Web Experience Factory neither enforces nor prevents this compliance. Application developers must know and understand ...

Yeah!!! New IBM Web Experience Factory V8.0 is announced!!!

A quick snapshot of what's new in IBM Web Experience Factory... IBM Web Experience Factory is all about making it quick and easy to develop applications (portlets) that are included as part of an exceptional web experience. We've seen our customers doing some awesome stuff, whether it be ...
Community articleCan I call a REST service through a proxy server?
Added by Rob Flynn | Edited by IBM contributorRob Flynn on December 21, 2009 | Version 8
expanded Abstract
collapsed Abstract
No abstract provided.
Tags: faq, FAQ, rest faq

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.

expanded Attachments (0)
collapsed Attachments (0)
expanded Versions (10)
collapsed Versions (10)
Version Comparison     
VersionDateChanged by              Summary of changes
12Dec 21, 2009, 3:40:48 PMRob Flynn  IBM contributor
11Dec 21, 2009, 3:40:03 PMRob Flynn  IBM contributor
9Dec 21, 2009, 3:35:11 PMDeanna Drschiwiski  IBM contributor
8Dec 21, 2009, 2:35:39 PMRob Flynn  IBM contributor
This version (8)Dec 21, 2009, 2:35:39 PMRob Flynn  IBM contributor
7Dec 21, 2009, 2:34:18 PMRob Flynn  IBM contributor
6Dec 21, 2009, 2:32:26 PMRob Flynn  IBM contributor
5Aug 7, 2008, 11:19:10 AMRob Flynn  IBM contributor
4Aug 7, 2008, 11:14:34 AMRob Flynn  IBM contributor
2Aug 7, 2008, 10:04:37 AMRob Flynn  IBM contributor
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedHelpAbout
  • IBM Collaboration Solutions wikis
  • IBM developerWorks
  • IBM Software support
  • Twitter LinkIBMSocialBizUX on Twitter
  • BlogsIBMSocialBizUX on Facebook
  • ForumsLotus product forums
  • BlogsIBM Social Business UX blog
  • Community LinkThe Social Lounge
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Accessibility
  • IBM Terms of use
  • Wiki terms of use