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