Class GetOltHttpClient
java.lang.Object
org.bgerp.plugin.bgb.getolt.dao.GetOltHttpClient
Shared HTTP clients for the GetOLT External API.
The GetOLT service is deployed in an internal network with a self-signed certificate
(CN=GetOLT self-signed), and the HTTP port responds with a 301 redirect to HTTPS.
The client checks the chain by default and fails on such a certificate with
SSLHandshakeException: PKIX path building failed — the request does not reach
the service either via http:// or https://.
So trusting the certificate is enabled explicitly: getolt:api.trustSelfSigned=1.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.http.impl.client.CloseableHttpClientget(boolean trustSelfSigned)
-
Method Details
-
get
public static org.apache.http.impl.client.CloseableHttpClient get(boolean trustSelfSigned) - Parameters:
trustSelfSigned- trusts any GetOLT service certificate- Returns:
- the shared client with a connection pool
-