cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Propagating client endpoint properties in the Message
Date Mon, 24 Mar 2014 13:40:07 GMT

On Mar 24, 2014, at 8:08 AM, Alessio Soldano <asoldano@redhat.com> wrote:

> Hi,
> I'm wondering if there's a specific reason for not copying the properties set in the
Endpoint reference in the Client to the Message being constructed in ClientImpl::doInvoke.
Something like:
> 

What would we gain by doing that?    That is already automatically done (kind of) when you
call the getContextualProperty on the message.


We currently have two “scopes” of properties on the message:

1) Actual message scope: these are properties directly set on the message

2) Contextual - these properties are “searched” through the hierarchy including the endpoint,
bus, etc….


What this does is move the endpoint properties from category 2 into category 1.    I’m not
sure what value that has.   Is there a particular use case or something we need?   More specifically,
is there someplace we are calling just “get(…)” where a "getContextualProperty(…)”
should be done instead?

Dan



> ---------------------------------------------------------
> diff --git a/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java b/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
> index 77522fb..2a100a9 100644
> --- a/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
> +++ b/api/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
> @@ -495,6 +495,7 @@ public class ClientImpl
>                 LOG.fine("Invoke, operation info: " + oi + ", params: " + Arrays.toString(params));
>             }
>             Message message = endpoint.getBinding().createMessage();
> +            message.putAll(endpoint);
>                          // Make sure INVOCATION CONTEXT, REQUEST_CONTEXT and RESPONSE_CONTEXT
are present
>             // on message
> ---------------------------------------------------------
> 
> WDYT?
> 
> Thanks
> Alessio
> 
> -- 
> Alessio Soldano
> Web Service Lead, JBoss
> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Mime
View raw message