Hi Bathiya, When there is no content-aware mediators present in the message flow (in here at outSequence), message get parsed as it is through the ESB without building. And when you put a log mediator, since log is a content-aware mediator, message builder get invoked. So issue is something to do with builders and content-type. You can enable wire logs for ESB and see the wire level messages in the response path to get a clue.
On Tue, Mar 4, 2014 at 1:00 PM, Chanaka Fernando <[email protected]> wrote: > Hi Bhathiya, > > With the latest ESB, you can use the log mediator to print JSON messages. > Please refer the below documentation. This documentation has a detailed > description about using JSON with WSO2 ESB. > > https://docs.wso2.org/display/ESB481/JSON+Support > > > Thanks, > Chanaka > > > On Tue, Mar 4, 2014 at 11:57 AM, Bhathiya Jayasekara > <[email protected]>wrote: > >> Hi devs, >> >> I was trying to run the sample in here [1]. It works fine as mentioned, >> and the client gets the response in json like this. >> >> {"Customer":{"id":123,"name":"John"}} >> >> Then I added a <log level="full"/> in out sequence. >> >> <outSequence> >> <log level="full"/> >> <send/> >> </outSequence> >> >> Now the response which client gets is like this. >> >> <Customer><id>123</id><name>John</name></Customer> >> >> but the Content-Type header is still *application/json*. >> >> Is this a known bug or am I missing something? >> >> [1] >> https://docs.wso2.org/display/ESB460/Using+REST+with+a+Proxy+Service#UsingRESTwithaProxyService-RESTClientandRESTService >> >> Thanks, >> >> -- >> *Bhathiya Jayasekara* >> *Software Engineer,* >> *WSO2 inc., http://wso2.com <http://wso2.com>* >> >> *Phone: +94715478185 <%2B94715478185>* >> *LinkedIn: http://www.linkedin.com/in/bhathiyaj >> <http://www.linkedin.com/in/bhathiyaj>* >> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* >> *Blog: http://movingaheadblog.blogspot.com >> <http://movingaheadblog.blogspot.com/>* >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > -- > Chanaka Fernando > 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 > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *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
