...
In
<PRODUCT_HOME>/repository/conf/axis2/axis2.xml
, edit thetransportSender
configuration of the http transport to specify the proxy server as follows:Code Block language html/xml <transportSender name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender"> <parameter name="non-blocking" locked="false">true</parameter> <parameter name="http.proxyHost" locked="false">localhost</parameter> <parameter name="http.proxyPort" locked="false">8080</parameter> </transportSender>
In the Synapse configuration of the proxy service that sends messages to this proxy server, set the following two properties before the send mediator:
Code Block language html/xml <syn:property name="Proxy-Authorization" expression="fn:concat('Basic ', base64Encode('userName:password'))" scope="transport"/> <syn:property name="POST_TO_URI" value="true" scope="axis2"/>
The first property sets the
Proxy-Authorization
HTTP transport header with the base64 encoded user name and password as expected by the HTTP basic authentication. The second property makes the outgoing URL a complete URL understandable by the proxy server.
...