Spring-Integration 4:
I'd like to make communication with http outbound-gateway for HTTPS. i.e. with secure protocol. Requirement is I'd like to use URL "https://" but we don't have certificate & need to bypass this.
Spring-Integration 4:
I'd like to make communication with http outbound-gateway for HTTPS. i.e. with secure protocol. Requirement is I'd like to use URL "https://" but we don't have certificate & need to bypass this.
I found in some my old project this config:
<bean id="clientHttpRequestFactory" class="org.springframework.http.client.CommonsClientHttpRequestFactory"/>
<!--TODO waiting HttpClient SSL impl <bean id="clientHttpRequestFactory" class="org.springframework.http.client.HttpComponentsClientHttpRequestFactory"/>-->
And I remember that such kind of CommonsClientHttpRequestFactory
for commons-http-client-3.0
allows to accept all server certificates. Otherwise you should customize HttpComponentsClientHttpRequestFactory
for commons-http-client-4.x
, like this:
CloseableHttpClient httpClient = HttpClients.custom().setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE).build()
See more info in this answer: How to ignore SSL certificate errors in Apache HttpClient 4.0.
After that customization you just should inject that clientHttpRequestFactory
to the <int-http:outbound-gateway>
.