Hi Al, Take a look at what we do in Liberty to configure client proxy authentication: https://github.com/OpenLiberty/open-liberty/blob/integration/dev/com.ibm.ws.jaxrs.2.0.client/src/com/ibm/ws/jaxrs20/client/configuration/LibertyJaxRsClientProxyInterceptor.java
The main difference as I see it is that we use the HTTPClientPolicy (that you get from the HTTPConduit) to set things like the proxy host/port/etc. and the ProxyAuthorizationPolicy for the username/password. Hope this helps, Andy On Thu, Feb 1, 2018 at 6:00 PM, Al Grant <[email protected]> wrote: > Hi All, > > I am trying to get my https client to get out through our proxy. > > I have configured the connection as outlined below but apparently no > credentials are being sent to our proxy so I must be doing something wrong: > > org.apache.cxf.endpoint.Client client = > org.apache.cxf.frontend.ClientProxy.getClient(irsiService); > org.apache.cxf.endpoint.Endpoint cxfEndpoint = > client.getEndpoint(); > > cxfEndpoint.getOutInterceptors().add(loi); > cxfEndpoint.getInInterceptors().add(lii); > > HTTPConduit http = (HTTPConduit) client.getConduit(); > http.getClient().setProxyServer("webproxy.sales.com.au"); > http.getClient().setProxyServerPort(8080); > http.getProxyAuthorization().setUserName("username"); > http.getProxyAuthorization().setPassword("password"); > > http.setTlsClientParameters(tlsParams); > > // SEND DATA > response = irsiService.setSale(request); > System.out.println(response.isSuccess()); > System.out.println("Sent"); > System.out.println("Sale ID: " +response.getSaleId()); > > Any suggestions? > > Cheers > > A > > > > -- > Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html >
