Configuring HTTP proxy on clients
Problem: A virtual service is created on a proxy agent and the user is unable to record messages.
Solution: Configure the HTTP Proxy on clients.
All examples below of specific client configurations are using the proxy server HTTP(S) Proxy Agent listening on address hostname
with port 6071.

The .NET client can be configured to use a default proxy server or a specific proxy server.
If using the default proxy server, take HTTP Proxy Agent settings to configure the default proxy server. This is done in MS Windows or Internet Explorer in Internet Properties > Connections > LAN settings > Proxy server. You must then configure the client to use the default proxy. This is set in the application configuration file either for application in element <defaultProxy>
:
<configuration>
<system.net>
<defaultProxy enabled="true">
<proxy usesystemdefault="true"/>
</defaultProxy>
</system.net>
</configuration>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="myHttpBinding" bypassProxyOnLocal="false" useDefaultWebProxy="true">
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
The same configuration file can be used to set a specific proxy server. This is an example of client configuration for application:
<configuration>
<system.net>
<defaultProxy enabled="true">
<proxy proxyaddress="http://hostname:6071"/>
</defaultProxy>
</system.net>
</configuration>
, or for specific binding:
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="myHttpBinding" bypassProxyOnLocal="false" useDefaultWebProxy="false" proxyAddress=" http://hostname:6071">
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>

The proxy settings for Java client are given to the JVM via command line arguments. This is an example of how to run the client from the command line with proxy configuration:
java -Dhttp.proxyHost=hostname -Dhttp.proxyPort=6071 MyJavaClient

Add the Java proxy parameters to Java options in JAVA_OPTIONS
environment variable in the proper section of script %WL_HOME%\common\bin\commEnv.cmd
for MS Windows or in ${WL_HOME}/common/bin/commEnv.sh
for Unix/Linux. This is example of setting proxy configuration in file commEnv.cmd
(MS Windows):
set JAVA_OPTIONS=%JAVA_OPTIONS% -Dhttp.proxyHost=hostname -Dhttp.proxyPort=6071
, or in file commEnv.sh
(Unix/Linux):
JAVA_OPTIONS="${JAVA_OPTIONS} -Dhttp.proxyHost=hostname -Dhttp.proxyPort=6071

The HTTP proxy on the WebSphere application server can be configured via setting transport properties http.proxyHost
and http.proxyPort
. These HTTP transport properties can be set via:
-
Using wsadmin.
-
Using an assembly tool.
-
Using the JVM custom property panel in the administrative console.
To learn more about (1) and (2), see the Configuring additional HTTP transport properties documentation in WebSphere. To configure the HTTP proxy properties using (3) use the administrative console with the following steps:
-
Open the administrative console.
-
Click Servers > Application Servers > server > Java and Process Management > Process definition > Java Virtual Machine > Custom Properties.
-
(Optional) If the property is not listed, create a new property name.
-
Enter the name
http.proxyHost
and valuehostname
. -
Enter the name
http.proxyPort
and value6071
. -
Restart the server.

Add the Java proxy parameters to Java options in JAVA_OPTS
environment variable in the startup script %JBOSS_HOME%\bin\run.bat
or run.conf.bat
for MS Windows or in ${JBOSS_HOME}/bin/run.sh
or run.conf
for Unix/Linux. This is an example of setting the proxy configuration in JAVA_OPTS
environment variable in file run.conf.bat
(MS Windows):
set "JAVA_OPTS=-Dhttp.proxyHost=hostname -Dhttp.proxyPort=6071
, or in file run.conf (Unix/Linux):
JAVA_OPTS="-Dhttp.proxyHost=hostname -Dhttp.proxyPort=6071