In cleanup the camel-cxf component, I have the following questions.
In CxfProducer.process() method (below), it creates and passes an
empty HashMap to the CxfBinding.propogateContext() method.
// Get context from message
Map<String, Object> context = new HashMap<String, Object>();
Map<String, Object> responseContext =
CxfBinding.propogateContext(inMessage, context);
Step inside the CxfBinding.propogateContext() method, the following
code creates a WrappedMessageContext which is in the
org.apache.cxf.jaxws.context package.
// TODO map the JAXWS properties to cxf
if (requestContext != null) {
Map<String, Object> realMap = new HashMap<String, Object>();
WrappedMessageContext ctx = new WrappedMessageContext(realMap,
null,
Scope.APPLICATION);
ctx.putAll(requestContext);
requestContext = realMap;
}
Since requestContext is always empty, ctx.putAll() will not all thing
to ctx (the WrappedMessageContext). In the end, requestContext is
still a empty HashMap. This (CxfProducer.process()) the only place
that calls CxfBinding.propogateContext(). So, what is the intention
of using a WrappedMessageContext in the snippet? And, do we need to
worry about the TODO comment?
Thanks,
William