Any update on this? Looks like the latest org.apache.axis2.json.gson.JsonFormatter is broken since the application/json content-type header is not added to the response.
Charitha Kankanamge cell: +1 812-391-7730 http://charithaka.blogspot.com *SOA and Testing without nonsense* On Wed, May 28, 2014 at 12:51 AM, Charitha Kankanamge <[email protected]>wrote: > Hi Anjana et all, > DSS uses org.apache.axis2.json.gson.JsonFormatter by default. However, > when calling a service which responds JSON, the message looks similar to > the following. > > *HTTP/1.1 200 OK* > *Transfer-Encoding: chunked* > *Date: Tue, 27 May 2014 19:14:45 GMT* > *Connection: close* > *Server: WSO2 Carbon Server* > > {"customers":{"customer":[{"phone":"6175559555 > ","contact":{"contact-last-name":"Yoshido","customer-name":"Gifts4AllAges.com","contact-first-name":"Juri"},"city":"Boston"},{"phone":" > 6175552555","contact":{"contact-last-name":"Franco","customer-name":"Diecast > Collectables","contact-first-name":"Valarie"},"city":"Boston"}]}} > > I had to comment out this default formatter and use the > org.apache.axis2.json.JSONMessageFormatter. > Then I got the correct response. > > HTTP/1.1 200 OK > *Content-Type: application/json;charset=UTF-8* > Transfer-Encoding: chunked > Date: Tue, 27 May 2014 19:17:02 GMT > Connection: close > Server: WSO2 Carbon Server > > {"customers":{"customer":[{"phone":"6175559555 > ","contact":{"contact-last-name":"Yoshido","customer-name":"Gifts4AllAges.com","contact-first-name":"Juri"},"city":"Boston"},{"phone":" > 6175552555","contact":{"contact-last-name":"Franco","customer-name":"Diecast > Collectables","contact-first-name":"Valarie"},"city":"Boston"}]}} > > This can simply be observed by running JSON sample included in a fresh > pack (DSS-3.2.1). Is this a bug in new formatter? If so, it is better to > document this and ask to use org.apache.axis2.json.JSONMessageFormatter > instead. > > Thanks! > Charitha > > > Charitha Kankanamge > cell: +1 812-391-7730 > http://charithaka.blogspot.com > *SOA and Testing without nonsense* >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
