Ayoob, both these resources are valid for the request you are sending. You can't say one is wrong and the other is right. What you're expecting is like a best match scenario, which synapse doesn't support at the moment. It should be possible to implement it using a scoring mechanism or something like that, but it'll definitely impact performance.
>From a REST point of view, its an invalid design. So my question is why bother anyway? Do you really have resource paths that are impossible to determine at design time? On Tue, Apr 25, 2017 at 10:06 AM, Ayyoob Hamza <[email protected]> wrote: > Hi All, > > In IoTS, We have exposed all the APIs through the API manager. In a > particular API, we have 2 API resources > > 1) POST /* with a scope X1 > 2) POST /{type}/operations with a scope X2. > > When we invoke the second resource, API call ends up going to the first > one in the synapse layer. However after synapse forwards it to the backend, > it ends up to the correct resource in the Jax-rs. > The issue we are facing in here is that during scope validation it picks > up the wrong resource. > > So this made me wondered why is the mapping is correctly evaluated in the > tomcat but not in the synapse layer. Do we have a bug here? or was it an > architecture decision to go with the first matching resource. > > Are there any solutions to pick the best possible matching resource in the > synapse layer? > > Thanks > *Ayyoob Hamza* > *Senior Software Engineer* > WSO2 Inc.; http://wso2.com > email: [email protected] cell: +94 77 1681010 <%2B94%2077%207779495> > -- Nuwan Dias Software Architect - WSO2, Inc. http://wso2.com email : [email protected] Phone : +94 777 775 729
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
