Just to be sure: do you use Camel transport in the client application and camel 
route on the client side or normal CXF client and camel cxf: component on the 
server side?

In the first case the transport maps PROTOCOL_HEADERS CXF message properties to 
Camel exchange (see CxfHeaderHelper.propagateCxfToCamel()). So it should be 
possible to set custom property in your client:
        Map<String, List<String>> heads = new HashMap<String, List<String>>();
        List<String> value = new ArrayList<String>();
        value.add("testValue");
        heads.put("testKey", value);
        ((BindingProvider) 
flightReservation).getRequestContext().put(Message.PROTOCOL_HEADERS, heads);

and property should be available in Camel exchange.

In second case, as far as client application communicates with server side 
camel route using SOAP, the only way to pass properties is either SOAP header 
or SOAP body (payload).

Regards,
Andrei.

-----Original Message-----
From: helander [mailto:[email protected]] 
Sent: Sonntag, 21. Oktober 2012 18:29
To: [email protected]
Subject: CXF client with camel transport

I am using the Camel transport for a CXF client. In the Camel route I need 
access to a "property" known by the CXf client application. The "property"
is a string value that the client determines in association with each request 
and the Camel route needs this property value since it will control the 
"routing" actions. 
A possible approach would be to pass this information in a SOAP header but I 
would like to avoid this for various reasons. Are there any other methods that 
could be used to pass this kind of information from the client application to 
the Camel exchange or in-message?

Thanks

Lars



--
View this message in context: 
http://cxf.547215.n5.nabble.com/CXF-client-with-camel-transport-tp5717070.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to