<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xmlns:conf-sec="http://cxf.apache.org/configuration/security"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd">
<http-conf:conduit name="*.http-conduit">
<http-conf:client ProxyServer="http://www-url-to-my-proxy.com" ProxyServerPort="80" />
<http-conf:proxyAuthorization>
<conf-sec:UserName>username</conf-sec:UserName>
<conf-sec:Password>password</conf-sec:Password>
</http-conf:proxyAuthorization>
</http-conf:conduit>
</beans>
2 comments:
Is there any way to set a proxy server and port attribute via the CXF Java API?
Nevermind, I actually figured it out:
HTTPClientPolicy policy = new HTTPClientPolicy();
policy.setProxyServer(System.getProperty("http.proxyHost"));
policy.setProxyServerPort(Integer.valueOf(System.getProperty("http.proxyPort")).intValue());
httpConduit.setClient(policy);
Post a Comment