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 ?
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 <[email protected]> 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
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev