I hit in this way: 
  client.getRequestContext().put(key,value);
  client.getResponseContext().put(key,value);
and it also works well with a custom interceptor.  
Thanks Dan!

Xilai
-----Original Message-----
From: Daniel Kulp [mailto:[email protected]] 
Sent: Thursday, August 08, 2013 3:46 AM
To: [email protected]; XiLai Dai
Subject: Re: How to set a property to Client after it's created from FactoryBean


On Aug 6, 2013, at 11:14 PM, XiLai Dai <[email protected]> wrote:

> Hi, there
> 
> I got a quick question: how to set a property value to Client after it's 
> already created from an FactoryBean?
> 
> ClientFactoryBean clientFactory = new JaxWsClientFactoryBean(); 
> clientFactory. setProperties(...); Client client = 
> clientFactory.create();
> 
> Then, how to add a new property name/value to the client object?

Probably do a client.getEndpoint().put(....)  if you are just trying to set 
something that can be queries as a contextual property in an interceptor.

Dan




> 
> Thanks!
> Xilai

--
Daniel Kulp
[email protected] - http://dankulp.com/blog Talend Community Coder - 
http://coders.talend.com

Reply via email to