L.S.,
The value for the JbiConstants.HTTP_DESTINATION_URI normalized message
header is retrieved by the provider endpoint whenever a message
exchange arrives. As far as I know, there's way to intervene there.
However, you could easily write a little Camel route that sits in
between the original calling services and your CXF provider endpoint
and that sets the message header.
Something like:
from("jbi:service:<full namespace for gui>:router")
.setHeader(JbiConstants.HTTP_DESTINATION_URI,
constant("http://not.the.dummy/service/uri"))
.to("jbi:service:<full namespace for gui>:GUIService")
Once you get this working, you can replace the constant() with a bean
or some expression language to determine the correct URI to use.
Camel has a lot of different options there - just pick any solution
you like from the list at http://camel.apache.org/expression.html
Regards,
Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
On Mon, Feb 7, 2011 at 11:24 AM, killroy <[email protected]> wrote:
>
> Hi,
>
> I need to access external service over SOAP from a cxf-su component. The
> external service has a dynamic ip address, so I need to dinamically
> configure the CXF-BC provider endpoint.
>
> I managed to set up the connector provider in xbean.xml of my connector
> component
> <cxfbc:provider wsdl="classpath:GUI.wsdl"
> locationURI="http://dummy"
> service="gui:GUIService"
> interfaceName="gui:GUI">
> </cxfbc:provider>
>
> If I set locationURI to a meaningful address instead of dummy, where my
> external service runs, I can call it's methods from my cxf-su component.
> But, since my external service can change the address, I need to somehow
> reconfigure locationURI. I googled it and there is a mention of setting
> JbiConstants.HTTP_DESTINATION_URI, but there is no clear explanation of how
> and where to do it. Ideally it would be great if I could change it from a
> class inside my cxf-su.
>
> Is there a way to do this?
>
> Thanks!
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Accessing-external-service-from-SMX-component-tp3374042p3374042.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>