Organizations may expose the services over a proxy server for several purposes. In such a case, when user configures ESB, he has to provide proxy server configurations.
In axis2 configuration , at the transport sender configuration two properties has to be provided.
eg:
In axis2 configuration , at the transport sender configuration two properties has to be provided.
- http.proxyHost : Proxy server's IP
- http.proxyPort : Prosy server's port
<transportSender name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">And a property (POST_TO_URI) has to be set in the synapse configuration to make ESB's out going URL a complete URL.
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="http.proxyHost" locked="false">192.168.0.26 </parameter>
<parameter name="http.proxyPort" locked="false">3128</parameter>
</transportSender>
eg:
<inSequence>Depends on the proxy server's behaviour we may need to set some additional properties.
<property name="POST_TO_URI" value="true" scope="axis2"/>
<send>
<endpoint>
<address uri="http://192.168.0.26:9000/services/SimpleStockQuoteService"/>
</endpoint>
</send>
</inSequence>
- DISABLE_CHUNKING : If the proxy server doesn't support HTTP chunking.
<property name="DISABLE_CHUNKING" value="true" scope="axis2"/>
- FORCE_HTTP_1.0 : If proxy server supports only HTTP/1.0 messages.
<property name="FORCE_HTTP_1.0" value="true" scope="axis2"/>These properties can be applied to WSO2API Manager as well, since WSO2ESB is used as the gateway for APIManager.
Hello,
ReplyDeleteFirst of all, thanks for this information. However, I am not sure how to supply this information (proxy host and port) in WSO2 ESB 4.7.0 for Windows. Do you have a walkthrough for that?
Thanks in advance.
ESB 4.7.0 released with passthru transport..You can use same parameters there..
ReplyDelete