Hi,

It is possible to to change the service address of cxf endpoint producer at runtime. But when you change the address of the cxf endpoint consumer you have to restart the route.

I don't think the setAddress method can help you, as the client address is set when the cxf producer is created.

You can override the client address by setting a property to the request context like this[1]

[1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java

Willem

On 1/20/11 7:23 PM, Marcos Díez Fernández wrote:
Hi,

I have set up a camel CXF client with Spring in ServiceMix-4.3.0-fuse-03-00 
based on Karaf OSGi container. Due to my project requirements, and to take 
advantage of OSGI capabilities,  I'd like to change the CXF endpoint's address 
dynamically. Until now I can extract the endpoint from the camel context but 
I'm not able to modify its address:

CxfEndpoint cxfEndpoint = (CxfEndpoint) 
camelContext.getEndpoint("cxfEsiosMPClient");

I've seen there is a setAddress method for CxfEndpoint in Camel 2.5.0, but 
currently Servicemix just contains Camel 2.4.0, which doesn't have this setter.

Does this setter solves this issue, and therefore I should wait for a new 
version of ServiceMix? Or is there any workaround for this?

Any help would be appreciate. Thanks in advance.

BR,

Marcos




--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Reply via email to