简体   繁体   中英

How to get camel exchange in cxf interceptor

I want to get the exchange body in cxf interceptor and make it as a camel exchange property. So that I can use this property in any processor or bean methods. I tried to get exchange with message.getExchange() but it will return a cxf exchange. How can I use the org.apache.cxf.message.Message to get the org.apache.camel.Exchange .

Perhaps you cannot do it exact that way because CXF interceptors are beyond Camel and have no idea about Camel. Camel Exchange is above CXF. But if you need to do exact what you said:

get the exchange body ... and make it as a camel exchange property

What does prevent you from doing that in the processor at very first step in Camel route? Why do you try to do that in CXF Interceptor?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM