Hi hiranya, I tested my proposed solution and it works fine to me...Not sure about the side effects... Thanks -Ratha
________________________________ From: Hiranya Jayathilaka <[email protected]> To: [email protected]; vijayaratha vijayasingam <[email protected]> Sent: Monday, 28 November 2011, 12:48 Subject: Re: Synapvise does not forward requests via proxyserver for a 'https' endpoint Hi Ratha, Can you get your scenario to work with the fix you have suggested? If so then we can seriously consider it as a viable solution. Thanks, Hiranya On Wed, Aug 31, 2011 at 2:21 PM, vijayaratha vijayasingam <[email protected]> wrote: Hi all; > > >Synapse is not working when we configure 'http' proxy to talk to 'https' >endpoint via a proxyserver. >At axis2.xml, transport sender configuration, i have added proxy server >configuration,with the additional two parameters.. > > > ><parameter locked="false" name="http.proxyHost">10.100.1.162</parameter> ><parameter locked="false" name="http.proxyPort">443</parameter> >//https port number > <parameter name="HostnameVerifier">AllowAll</parameter> > > >Anyway, this configuration is not picked by synapse @ HttpCoreNIOSender >class, since the condition is like, >if (sslContext == null) { > proxyHost = > proxyPort = > >} > > >if we remove (sslContext==null) condition then both scenarios(http/https >sender) work fine..But I'm not sure how this will affect other scenarios.. > > >Please advice me on how this should be fixed? > >These are my configuration looks.. > > >Proxy; > <proxy name="TestProxy" transports="http" startOnLoad="true" trace="disable"> > <target> > <inSequence> > <send> > <endpoint> > <address >uri="https://localhost:9444/services/SimpleStockQuoteService"/> > </endpoint> > </send> > </inSequence> > <outSequence> > <send/> > </outSequence> > </target> > </proxy> > > >And my axis2.xml transport sender configured as; (i added two parameters >http.proxyHost, http.proxyPort with the http/https ports of proxyserver..) > > > <transportSender name="http" >class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender"> > <parameter name="non-blocking" locked="false">true</parameter> > <parameter locked="false" >name="http.proxyHost">10.100.1.162</parameter> > <parameter locked="false" name="http.proxyPort">80</parameter> > </transportSender> > <transportSender name="https" >class="org.apache.synapse.transport.nhttp.HttpCoreNIOSSLSender"> > <parameter name="non-blocking" locked="false">true</parameter> > <parameter name="keystore" locked="false"> > <KeyStore> > ><Location>repository/resources/security/wso2carbon.jks</Location> > <Type>JKS</Type> > <Password>wso2carbon</Password> > <KeyPassword>wso2carbon</KeyPassword> > </KeyStore> > </parameter> > <parameter name="truststore" locked="false"> > <TrustStore> > ><Location>repository/resources/security/client-truststore.jks</Location> > <Type>JKS</Type> > <Password>wso2carbon</Password> > </TrustStore> > </parameter> > <parameter locked="false" name="http.proxyHost">10.100.1.162</parameter> > <parameter locked="false" name="http.proxyPort">443</parameter> > <parameter name="HostnameVerifier">AllowAll</parameter> > </transportSender> > > >Thanks >-Ratha > -- Hiranya Jayathilaka Associate Technical Lead; WSO2 Inc.; http://wso2.org E-mail: [email protected]; Mobile: +94 77 633 3491 Blog: http://techfeast-hiranya.blogspot.com
