Hi. 

Thank you for the reply. But I seem to be stuck. 
Could you please explain further. I am quite new to CXF and Servicemix. 

What type of interceptor should I use, and in what phase?
I can“t get the INVOCATION_CONTEXT when i try your solution. 

I also tried to get a hold of the httpConduit in the message, when fiddeling
with the SoapInterceptors, but failed miserably..

/O




Freeman Fang wrote:
> 
> Hi,
> Yeah, you can do it by  adding an interceptor for your cxf bc provider 
> outgoing interceptor chain
> 
> 
>       Map<String, Object> reqCtx = 
> org.apache.cxf.helpers.CastUtils.cast((Map<?, 
> ?>)message.get(Message.INVOCATION_CONTEXT));
>       reqCtx = org.apache.cxf.helpers.CastUtils.cast((Map<?, 
> ?>)reqCtx.get("RequestContext"));
>       reqCtx.put(BindingProvider.USERNAME_PROPERTY, "yourusername");
>       reqCtx.put(BindingProvider.PASSWORD_PROPERTY, "yourpswd");
> 
> Freeman
> Ola_S wrote:
>> Hi. 
>>
>> I have a <cxfbc:provider> set up nicely. With user and password
>> configuration in busCfg  XML-file. This works like a charm, but now I
>> want
>> to dynamically set the user and password. 
>>
>> Can I set this programatically in some way. 
>>
>> /O
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Change-user-password-for-cxfbc%3Aprovider-tp21054069p21092354.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to