Upgrading Axis2 to 1.8.0 in the spring boot (java based) framework causes a “remote host closed connection during handshake” error.
Root Cause:
The problem is due to the transport sender class change from axis2-kernel 1.7.9 (or below) to
1.8.0. The former uses CommonsHTTPTransportSender and the latter uses HTTPClient4TransportSender.
There is an implementation difference between using CommonsHTTPTransportSender and HTTPClient4TransportSender. If using HTTPClient4TransportSender, it is not enough to set the
default SSL socket context. We need to set up a HttpClient object, with SSL context in order for using HTTPClient4TransportSender.
We have 2 ways to resolve this issues with Axis 1.8.0:
See attached PDF for Java Code example for both solutions.
Solution 1:
Solution 2:
Classpath Reference:
See attached PDF for Java Code example for both solutions.