1
我嘗試將代理添加到我的Apache CXF 3客戶端API。使用Apache CXF 3和JAX-RS 2.0添加客戶端代理
ClientBuilder.newClient().target(serverUri)
.request()
.post();
隨着澤西實現我用ClientConfig:
ClientConfig config = new ClientConfig();
config.connectorProvider(new ApacheConnectorProvider());
config.property(ClientProperties.PROXY_URI, proxyAddress);
ClientBuilder.newClient(config) ...
,我希望做CXF 3同樣的事情,而不使用其特定的客戶端(我用的JAX-RS客戶端實現),而不是設置JVM上的代理。
任何幫助將apriciated;)
編輯:
的解決方案一開始可以:
client.property("http.proxy.server.uri", proxyUri);
client.property("http.proxy.server.port",proxyPort);
,但我沒有找到代理認證特性。