camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Quick questions in CxfBinding
Date Tue, 13 Jan 2009 07:10:13 GMT
Hi William,

Thanks for review my old codes, I had to admit the context which is
passed into the propogateContext is useless.
CxfBinding.propogateContext() just get the request and response context
from the inMessage. the context codes may be left from the refactoring a
year ago.

And the TODO tag should be removed, we just leverage the CXF's utils
class WrappedMessageContext to implement the JAXWS properties to cxf
internal properties mapping.


William Tam wrote:
> 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,
>             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

View raw message