1
votes

I have a question regarding the configuration of a http-proxy in WSO2 ESB (4.7). The documentation says that the http-proxy (http://docs.wso2.org/display/ESB470/HTTP-NIO+Transport) is defined on the transport level. Is the consequence that on proxy-mediation level, all proxy-mediations using the respective transport will use the configured http-proxy or can the http-proxy used by the system configured individually per proxy-mediation?

Kind regards,

Heiko

1

1 Answers

0
votes

You can configure the http proxy in axis2.xml conf file, find transportSender name="http" and add those parameters :

<parameter name="http.proxyHost" locked="false">host</parameter>
<parameter name="http.proxyPort" locked="false">8080</parameter>

or with java start parameters : -Dhttp.proxyHost=host -Dhttp.proxyPort=8080

You can add http.nonProxyHosts parameter to avoid going through this proxy for some hosts, but you can't define or choose such a http proxy in your mediation. All you have to do in your mediation is to define authentication if needed, before send :

<property name="Proxy-Authorization" expression="fn:concat('Basic ', base64Encode('udayanga:test123'))" scope="transport"/>
<property name="POST_TO_URI" value="true" scope="axis2"/>