Does anyone know how to configure a spring configured CXF client to use a proxy to get through our firewall to an outside service? I've used jvmargs of -DhttpProxy.port and -DhttpProxy.host but CXF doesn't appear to use the java.net.URL classes which take these settings into account. When the service is set up locally on my box and successfully accessed my client spring configuration file, clientBeans.xml, looks like this:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <bean id="client" class="demo.spring.HelloWorld" factory-bean="clientFactory" factory-method="create"/> <bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"> <property name="serviceClass" value="demo.spring.HelloWorld"/> <property name="address" value="http://localhost:8080/cxfs/ws/HelloWorld"/> </bean> </beans> And my client code looks like this: ClassPathResource cres = new ClassPathResource("demo/spring/client/clientBeans.xml"); BeanFactory fac = new XmlBeanFactory(cres); HelloWorld service = (HelloWorld) fac.getBean("client"); System.out.println("calling: " + service.sayHi("Mark")); This all works just fine until I move that service outside the firewall and need to use a proxy. When the client runs outside the firewall things are again fine. So I know that the service is working. I've even dug into the source for JaxWsProxyFactoryBean a little bit but got lost fairly quickly. Any suggestions? Thanks. Mark -- View this message in context: http://www.nabble.com/using-HTTP-firewall-proxy-with-CXF-Spring-config-tf4232625.html#a12042089 Sent from the cxf-user mailing list archive at Nabble.com.
