Using a Proxy to Call a Web Service
1 Introduction
In some cases, you’re stuck behind a firewall and thus unable to call a web service directly. This document shows you how to configure the JVM to use a proxy to call such services.
2 Proxy Host and Proxy Port
There are two JVM parameters (system properties) that specify which proxy server to use: http.proxyHost
and http.proxyPort
You can specify these in your .m2eerc under JVM parameters:
|
|
or directly (when calling from, for instance, eclipse):
|
|
3 Proxy User and Password
Some proxies require authentication. To specify the user and password, simply pass two JVM parameters:
|
|
4 SSL
You can also connect while using a secure sockets layer (such as https
). To configure the proxy, you need to specify different proxy settings to connect: https.proxyHost
and https.proxyPort
. In addition, you need to import the ssl certificate of the proxy server into your java keystore. More information can be found on the Oracle website
For more details, see the Oracle documentation on proxies.
Feedback
Was this page helpful?
Glad to hear it! Thank you for your response.
Sorry to hear that. Please tell us how we can improve.