slew77 wrote:
> 
> Hi,
> 
> Hope someone can help me.
> 
> I have a single CXF endpoint, which is used to invoke a remote service
> that could be at a number (Potentially thousands) of different
> locationURIs.  To do this I set the HTTP_DESTINATION_URI from a camel
> route, which then invokes the CXF BC via JBI.  In the xbean.xml for the
> CXF BC I have a fake location URI:
> 
>     locationURI="http://dummy";
> 
> When the service runs first time, every thing works perfectly, the
> locationURI is overridden and the remote service is invoked successfully. 
> However, if I later set the HTTP_DESTINATION_URI to a different location,
> it doesn't change the service that's invoked, it still invokes the one
> that was set first time.  This happens until I restart the container.
> 
> If I don't use CXF and use the servicemix-http BC, then it works, but I
> need to use CXF for the WSS features.
> 
> I'd really appreciate any help to find out how to fix or workaround this
> issue.  Sorry if I've not explained this well, I'd be happy to clarify
> anything.
> 
> Thanks,
> Steve.
> 
> 
> 

Some more info...

Setting a LoggingOutInterceptor shows that CXF doesn't see the updated URI
second time through.

First time around I call:

                exchange.getIn().setHeader(JbiConstants.HTTP_DESTINATION_URI,
exchange.getIn().getHeader(MiGConstants.HEADER_PROPERTY_MIG_CUSTOM_URI));

Logging this using:
                if (logger.isDebugEnabled())
                        logger.debug("ITKAdapter set destination URI to: " +
exchange.getIn().getHeader(JbiConstants.HTTP_DESTINATION_URI));

I get:

                ITKAdapter set destination URI to:
http://localhost:7654/SendDischargeSummary/

And the LoggingOutInterceptor shows:

LoggingOutInterceptor                              |
.interceptor.LoggingOutInterceptor$LoggingCallback  160 | Outbound Message
---------------------------
ID: 3
Address: http://localhost:7654/SendDischargeSummary/
...
---------------------------

Second time around the log shows:
                ITKAdapter set destination URI to:
http://localhost:8088/SendDischargeSummary/

But the LoggingOutInterceptor again shows:

LoggingOutInterceptor                              |
.interceptor.LoggingOutInterceptor$LoggingCallback  160 | Outbound Message
---------------------------
ID: 4
Address: http://localhost:7654/SendDischargeSummary/

Thanks for any help with this.
Steve.
-- 
View this message in context: 
http://old.nabble.com/Setting-HTTP_DESTINATION_URI-more-than-once-tp27874741p27874994.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to