Skip to Content
Oct 03, 2019 at 12:43 PM

HandshakeException while sending request from SAP CP (Java)

98 Views Last edit Oct 23, 2019 at 07:36 PM 2 rev

I'm trying to send GET/POST oData requests from Java-app on SAP CP to the SAP C4C system. From SOAPUI or local machine it works fine, from SAP CP it works too, but not always. Sometimes I got errors like this: 'HandshakeException: Remote host closed connection during handshake' or 'Unable to find valid certification path to requested target'.

 Client restClient = Client.create();
    WebResource webResource = restClient.resource("");
    return webResource.accept("application/json")
            .header("Authorization", "Basic " + authStringEnc)
            .header("x-csrf-token", "fetch")