L.S.,

The authentication happens in the
org.apache.servicemix.http.processors.ProviderProcessor class.  In the
process() method you will find the basic authentication credentials being
applied.

I think you can extend org.apache.servicemix.http.BasicAuthentication to
support Expression attributes for name and password.  You will probably also
have to change the applyCredentials() method signature, to add an additional
parameter -- the message itself -- which you will need to resolve the
expressions.  You can then reuse <sm:xpath /> to specify the expression in
your xbean.xml file.  

I hope this already gets you started.  Just let me know if you need any more
help...

I'm a bit confused about your reference to the other forum topic.  Do you
also want to use this feature?  Doesn't the proposed solution in this thread
work?


Regards,

Gert


Arif Mohd wrote:
> 
> Yes i want this feature, it is very much required i don't know how to
> proceed could you please provide me some hint where to change the
> servicemix code and if possible provide me some example code
> 
>   Some one in the forum was talking about this feature please have a look
> into the question 
> http://www.nabble.com/How-to-add-content-to-SOAP-Header-when-using-http-su-tf3595975s12049.html
> 
> This would be a great help to me.
> 
> With Warm Regards,
> Arif
> 
> 
> Gert Vanthienen wrote:
>> 
>> L.S.,
>> 
>> I don't think ServiceMix currently supports this out-of-the-box.  You can
>> raise a JIRA issue to suggest this improvement for a next release.  If
>> you want to add it, just let us know and well try to help you wherever we
>> can.
>> 
>> Regards,
>> 
>> Gert
>> 
>> 
>> 
>> 
>> Arif Mohd wrote:
>>> 
>>> Iam using servicemix-http BC i need to pass the authentication
>>> information dynamically i.e, the username and password will contain in
>>> the incoming message itself
>>> 
>>>  I should be able to pass the authentication info like this in xbean.xml
>>> 
>>> <basicAuthCredentials>
>>>   <username>${user}</username>
>>>   <password>${password}<password>
>>> </basicAuthCredentials>
>>> 
>>> where user,password will contain in the incoming message
>>> 
>>> Is there any possibility of making using of POJO support ?, if it is how
>>> to do that?
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-set-configuration-information-in-xbean.xml-dynamically-based-on-message-content-tf3732392s12049.html#a10601972
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to