On Fri, Jan 20, 2012 at 10:47 AM, Thilina Buddhika <thili...@wso2.com>wrote:

> Hi Hiranya,
>
> In synapse-core/API class, we set the API name to message context after
> the message is processed by handlers. So at the moment, API name is not
> available to handlers.
>
> But for handlers like BasicAuth and OAuth, it is required to get the API
> name at the handler level. So shall we set this property before handlers
> are invoked ?
>

+1

Thanks,
Hiranya


>
> I already modified the code locally as follows.
>
> void process(MessageContext synCtx) {
>         if (log.isDebugEnabled()) {
>             log.debug("Processing message with ID: " +
> synCtx.getMessageID() + " through the " +
>                     "API: " + name);
>         }
>
>       *  synCtx.setProperty(RESTConstants.SYNAPSE_REST_API, name);*
>
>         for (Handler handler : handlers) {
>             if (log.isDebugEnabled()) {
>                 log.debug("Processing message with ID: " +
> synCtx.getMessageID() + " through " +
>                         "handler: " + handler.getClass().getName());
>             }
> ....
>
> Thanks,
> Thilina
>
>
> On Fri, Jan 20, 2012 at 9:14 AM, Thilina Buddhika <thili...@wso2.com>wrote:
>
>> Hi Folks,
>>
>> What is the proper way to do this inside a handler ?
>>
>> Thanks,
>> Thilina
>>
>> --
>> Thilina Buddhika
>> Associate Technical Lead
>> WSO2 Inc. ; http://wso2.com
>> lean . enterprise . middleware
>>
>> phone : +94 77 44 88 727
>> blog : http://blog.thilinamb.com
>>
>
>
>
> --
> Thilina Buddhika
> Associate Technical Lead
> WSO2 Inc. ; http://wso2.com
> lean . enterprise . middleware
>
> phone : +94 77 44 88 727
> blog : http://blog.thilinamb.com
>



-- 
Hiranya Jayathilaka
Associate Technical Lead;
WSO2 Inc.;  http://wso2.org
E-mail: hira...@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to