Hi, Even after including Kasun's fix the scenario was failing for GET requests. We had a closer look at this and identified that the MESSAGE_BUILDER_INVOKED property is always set to true when it is passed via the tenant dispatcher, when it should be false (on the out path). I verified this by comparing it with the same scenario on ESB 4.7.0 and managed to find the cause:
In 4.1.0 org.wso2.carbon.core (patch0001 version) we have got: tenantResponseMsgCtx.setProperty(MultitenantConstants.MESSAGE_BUILDER_INVOKED,Boolean.FALSE); Set in line 151, this is missing in 4.2.0. Putting this line back has fixed the issue - I think it may have been a missed commit. I've attached a patch for this, please apply it if this fix is ok. Ravi On Thu, Aug 29, 2013 at 8:40 AM, Isuru Udana <[email protected]> wrote: > Hi Kasun, > > The fix you provided to enable Multitenant REST API support for Pass-Thru > Transport is not there in kernel 4.2.0. > > > > > > On Thu, Aug 29, 2013 at 12:19 AM, Dinusha Senanayaka <[email protected]>wrote: > >> Hi Kasun, >> >> >> On Thu, Aug 29, 2013 at 12:02 AM, Kasun Indrasiri <[email protected]> wrote: >> >>> Hi Dinusha, >>> >>> I have added MT REST support for PT sometime back (refer @architecture >>> 'Multitenant REST API support for Pass-Thru Transport') and >>> included/verified in ESB 4.7 release. >>> So, I guess API-M is also tested for these scenarios with PTT since >>> then. If this is some thing that you observe in the latest packs, then it >>> could be a regression in kernel or transport. >>> >> yes, this is in latest AM pack, built on new kernel-4.2.0.. It works >> fine in the AM-1.4.0 release. >> >> Regards, >> Dinusha. >> >>> Will check this and get back to you. >>> >>> >>> >>> >>> On Thu, Aug 29, 2013 at 12:00 AM, Dinusha Senanayaka >>> <[email protected]>wrote: >>> >>>> Hi Isuru, >>>> >>>> Following are the steps to reproduce the issue; >>>> >>>> 1. By default in APIM, we have enabled PT. >>>> 2. create/publish/subscribe an API using a tenant. (works for super >>>> tenant mode) >>>> 3. Do a HTTP GET request. Endpoint will send the response body as >>>> follows [a], but when it comes to the client through APIM response body has >>>> get dropped and received the empty response body as [b]. >>>> 4. No back-end errors are thrown. If we switch to nio instead of PT, >>>> client is receiving the response as expected. >>>> >>>> [a]. <soapenv:Body> >>>> <customers xmlns="http://ws.wso2.org/dataservice/samples/rdbms_sample >>>> "><customer><customer-name>Gifts4AllAges.com</customer-name><contact-last-name>Yoshido</contact-last-name></customer></customers> >>>> </soapenv:Body> >>>> >>>> >>>> [b]. <soapenv:Envelope xmlns:soapenv=" >>>> http://www.w3.org/2003/05/soap-envelope"> >>>> <soapenv:Body> >>>> </soapenv:Body> >>>> </soapenv:Envelope> >>>> >>>> Regards, >>>> Dinusha. >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Aug 28, 2013 at 11:10 PM, Isuru Udana <[email protected]> wrote: >>>> >>>>> Hi Dinusha, >>>>> >>>>> Can you elaborate more on the scenario and issue with configs and logs >>>>> ? >>>>> >>>>> >>>>> >>>>> On Wed, Aug 28, 2013 at 11:06 PM, Dinusha Senanayaka <[email protected] >>>>> > wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> When we do a HTTP GET request, response body getting dropped. This >>>>>> issue happens only for tenants with the PT. If we switch to NIO, client >>>>>> receive the response properly. >>>>>> Appreciate any help/ideas to resolve this. >>>>>> >>>>>> Regards, >>>>>> Dinusha. >>>>>> >>>>>> >>>>>> -- >>>>>> Dinusha Dilrukshi >>>>>> Senior Software Engineer >>>>>> WSO2 Inc.: http://wso2.com/ >>>>>> Mobile: +94725255071 >>>>>> Blog: http://dinushasblog.blogspot.com/ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> *Isuru Udana* >>>>> * >>>>> * >>>>> Senior * >>>>> Software Engineer >>>>> * >>>>> WSO2 Inc.; http://wso2.com >>>>> email: [email protected] cell: +94 77 3791887 >>>>> blog: http://mytecheye.blogspot.com/ >>>>> twitter: http://twitter.com/isudana >>>>> >>>> >>>> >>>> >>>> -- >>>> Dinusha Dilrukshi >>>> Senior Software Engineer >>>> WSO2 Inc.: http://wso2.com/ >>>> Mobile: +94725255071 >>>> Blog: http://dinushasblog.blogspot.com/ >>>> >>> >>> >>> >>> -- >>> Kasun Indrasiri >>> Software Architect >>> WSO2, Inc.; http://wso2.com >>> lean.enterprise.middleware >>> >>> cell: +94 71 536 4128 >>> Blog : http://kasunpanorama.blogspot.com/ >>> >> >> >> >> -- >> Dinusha Dilrukshi >> Senior Software Engineer >> WSO2 Inc.: http://wso2.com/ >> Mobile: +94725255071 >> Blog: http://dinushasblog.blogspot.com/ >> > > > > -- > *Isuru Udana* > * > * > Senior * > Software Engineer > * > WSO2 Inc.; http://wso2.com > email: [email protected] cell: +94 77 3791887 > blog: http://mytecheye.blogspot.com/ > twitter: http://twitter.com/isudana > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Ravi Undupitiya* Software Engineer; WSO2 Inc.; http://wso2.com * * *E-mail: [email protected] **M: **+94 772 930 712* * *Lean . Enterprise . Middleware
mt-rest-issue.patch
Description: Binary data
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
