Hi Kevin, Can you look into this and check whether we can merge this change to the latest synapse branch? Please talk to Ravi if you need any help.
Thanks, Chanaka On Wed, Aug 5, 2015 at 9:43 AM, Rushmin Fernando <rush...@wso2.com> wrote: > Had a chat with Malintha. > > Seems like we face this issue because *RESTRequestHandler *doesn't give > the priority to versioned APIs. > > The correct code is there in Synapse 2.1.2.wso2v6 [1] > > Created a JIRA [2] > > [1] - > > https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/dependencies/synapse/2.1.2-wso2v7/modules/core/src/main/java/org/apache/synapse/rest/RESTRequestHandler.java > > [2] - https://wso2.org/jira/browse/ESBJAVA-4012 > > Thanks > Rushmin > > > > > > On Mon, Aug 3, 2015 at 12:26 PM, Malintha Amarasinghe <malint...@wso2.com> > wrote: > >> Hi Rushmin, >> >> We faced something similar when introducing Default Version Feature for >> APIM 1.7. >> >> Can you please check whether you are facing the same issue as this? >> http://mail.wso2.org/mailarchive/architecture/2014-March/015574.html >> >> Thanks, >> Malintha >> >> >> On Mon, Aug 3, 2015 at 11:52 AM, Rushmin Fernando <rush...@wso2.com> >> wrote: >> >>> >>> >>> We recently upgraded App Manager's synapse version to 2.1.3.wso2v3 and >>> noticed some odd behavior. >>> >>> *Test case* >>> *-------------* >>> >>> There are two API config files (with some other API config files [1]) >>> >>> 1) admin--AppManagerSandbox.xml; *API Name* = SandboxOne; *Context* >>> = /am-sandbox >>> >>> 2) admin--AppManagerSandbox_vv1.xml; *API Name* = SandboxOne; >>> *Version* = v1; *Context* = /am-sandbox >>> >>> When the API is called with the URL *http://localhost:8280/am-sandbox/v1 >>> <http://localhost:8280/am-sandbox/v1> *....... >>> >>> Synapse *doesn't* pick the API with the version >>> (admin--AppManagerSandbox_vv1.xml). >>> >>> Rather it picks the non-versioned one (admin--AppManagerSandbox.xml) >>> >>> When the two APIs are renamed to '*AppMSandbox*' it works as expected. >>> >>> And even with the name 'SandboxOne' it works as expected, *when there >>> are no* API definitions other than the two *admin--AppManagerSandbox** >>> APIs >>> >>> >>> *So the summary is ....* >>> >>> Default APIs + SandboxOne ==> NO >>> Default APIs + AppMSandbox ==> YES >>> AppMSandbox ==> YES >>> SandboxOne ==> YES >>> >>> NO = Versioning doesn't work >>> YES = Versioning works >>> >>> >>> Is this a bug or am I doing something wrong ? >>> >>> >>> [1] >>> >>> <api xmlns="http://ws.apache.org/ns/synapse" >>> name="_WSO2AMAuthorizeAPI_" context="/authorize"> >>> <resource methods="GET" url-mapping="/*"> >>> <inSequence> >>> <send> >>> <endpoint> >>> <address uri=" >>> https://localhost:9443/oauth2/authorize"/> >>> </endpoint> >>> </send> >>> </inSequence> >>> <outSequence> >>> <send/> >>> </outSequence> >>> </resource> >>> </api> >>> >>> <?xml version="1.0" encoding="UTF-8"?><api xmlns=" >>> http://ws.apache.org/ns/synapse" name="_WSO2AMRevokeAPI_" >>> context="/revoke"> >>> <resource methods="POST" url-mapping="/*"> >>> <inSequence> >>> <send> >>> <endpoint> >>> <address uri="https://localhost:9443/oauth2/revoke >>> "/> >>> </endpoint> >>> </send> >>> </inSequence> >>> <outSequence> >>> <send/> >>> </outSequence> >>> </resource> >>> <handlers> >>> <handler >>> class="org.wso2.carbon.appmgt.gateway.handlers.ext.APIManagerCacheExtensionHandler"/> >>> </handlers> >>> </api> >>> >>> <api xmlns="http://ws.apache.org/ns/synapse" >>> name="_WSO2AMStatisticsAPI_" >>> transports="http" >>> context="/statistics"> >>> <resource methods="GET" url-mapping="/*"> >>> <inSequence> >>> <log level="full"/> >>> <loopback/> >>> </inSequence> >>> <outSequence> >>> <send/> >>> </outSequence> >>> </resource> >>> >>> <handlers> >>> >>> <handler class="org.wso2.carbon.appmgt.usage.publisher.UsageHandler"/> >>> >>> </handlers> >>> </api> >>> >>> <api xmlns="http://ws.apache.org/ns/synapse" name="_WSO2APPMTokenAPI_" >>> context="/token"> >>> <resource methods="POST" url-mapping="/*"> >>> <inSequence> >>> <send> >>> <endpoint> >>> <address uri=" >>> https://localhost:9443/appmoauth2/token"/> >>> </endpoint> >>> </send> >>> </inSequence> >>> <outSequence> >>> <send/> >>> </outSequence> >>> </resource> >>> <handlers> >>> <handler >>> class="org.wso2.carbon.appmgt.gateway.handlers.ext.APIManagerCacheExtensionHandler"/> >>> </handlers> >>> </api> >>> >>> >>> >>> >>> >>> >>> -- >>> *Rushmin Fernando* >>> *Technical Lead* >>> >>> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware >>> >>> email : rush...@wso2.com >>> mobile : +94772310855 >>> >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Malintha Amarasinghe >> Software Engineer >> *WSO2, Inc. - lean | enterprise | middleware* >> http://wso2.com/ >> >> Mobile : +94 712383306 >> > > > > -- > *Rushmin Fernando* > *Technical Lead* > > WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware > > email : rush...@wso2.com > mobile : +94772310855 > > > -- -- Chanaka Fernando Senior Technical Lead WSO2, Inc.; http://wso2.com lean.enterprise.middleware mobile: +94 773337238 Blog : http://soatutorials.blogspot.com LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0 Twitter:https://twitter.com/chanakaudaya Wordpress:http://chanakaudaya.wordpress.com
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev