Hi Vinuri, If this is a synapse handler you can follow the same approach at [1] or [2].
Hope this helps. [1] https://docs.wso2.com/display/AM170/Writing+Custom+Authentication+Handlers [2] https://docs.wso2.com/display/ESB470/Securing+REST+APIs#SecuringRESTAPIs-BasicAuthUsingaBasicAuthHandler Thanks. /Gayashan On Wed, Jan 28, 2015 at 2:02 PM, Vinuri Perera <[email protected]> wrote: > Hi All, > I'm working on a Custom API Handler which should invoke when a api request > is sent. > I was able to add the Api handler to the newly created API's by changing > the > *wso2am-1.7.0/repository/resources/api_templates/velocity_template.xml* > file > > <handlers xmlns="http://ws.apache.org/ns/synapse"> > > #foreach($handler in $handlers) > > <handler xmlns="http://ws.apache.org/ns/synapse" > class="$handler.className"> > > #if($handler.hasProperties()) > > #set ($map = $handler.getProperties() ) > > #foreach($property in $map.entrySet()) > > <property name="$!property.key" > value="$!property.value"/> > > #end > > #end > > </handler> > > #end > > <handler class="org.wso2.handler.ApiInvocationHandler"/> > > </handlers> > > > But is it possible to add this handler to the already existing API's ?? > > Thank You, > Best Regards, > ~Vinuri~ > -- > Vinuri Perera > Software Engineer | WSO2 Inc > > M : 0711518805 > > -- *Gayashan Amarasinghe* Software Engineer | Platform TG WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94718314517 Blog : gayashan-a.blogspot.com
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
