You can try system properties -Djavax.net.ssl.trustStore=... -Djavax.net.ssl.keyStore=... -Djavax.net.ssl.keyStorePassword=...
This usually work for any type of protocol (https,ldaps, ssl database connections) 2017-03-01 3:29 GMT+04:00 Andy McCright <[email protected]>: > Hi All, > > I have a user that is trying to use the JAX-RS Client APIs in WebSphere > Liberty (based on CXF 3.1.8) to make a secured HTTPS request to a remote > server via a secured proxy server using authentication. > > Here is a snippet of their code: > MultivaluedMap<String, Object> headers = new > MultivaluedHashMap<String, Object>(); > headers.add(AUTH_HEADER_NAME, getAuthorizationHeader()); > > if (_proxyKey != null) { > headers.add(PROXY_AUTH_HEADER_NAME, > getProxyAuthorizationHeader()); > } > > MessageResponse msgResponse = _client.target(_endPoint).path(_path) > .queryParam(VERSION, VERSION_DATE) > .request(MediaType.APPLICATION_JSON) // expected response mime > type > .headers(headers) > .post(Entity.entity(msgRequest, MediaType.APPLICATION_JSON), > MessageResponse.class); > > > The request is rejected by the Apache proxy server with a 407 error. Note > that they can send the same request using curl and authentication succeeds, > and the request is successfully sent to the end server through the > proxy. > > According to the user, the JAX-RS client does not add a valid > Proxy-Authorization header field to the request. > > Is this scenario possible with CXF? Any hints for how to make it work? > > Thanks in advance, > > Andy >
