Hi Sriashalya,

Can you try section 'Handling messages with no content type' in [1].

Also in this case you can try building using builder mediator [2]

[1]
https://docs.wso2.com/display/ESB481/Working+with+Message+Builders+and+Formatters

[2] https://docs.wso2.com/display/ESB481/Builder+Mediator

Best Regards,
Malaka

On Fri, Dec 12, 2014 at 10:24 AM, Sriashalya Srivathsan <asha...@wso2.com>
wrote:
>
> When I send the request to back end ,it sends the response without any
> content type.So ESB sends the binary format to the REST Client.
>
> Can anyone please help me to handle this situation.
>
>
>
> [2014-12-11 16:53:24,701] DEBUG - wire >> "POST
> /services/zoho_GetAuthToken HTTP/1.1[\r][\n]"
> [2014-12-11 16:53:24,701] DEBUG - wire >> "Host:
> sriashalyas-macbook-pro.local:8280[\r][\n]"
> [2014-12-11 16:53:24,701] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
> [2014-12-11 16:53:24,701] DEBUG - wire >> "Content-Length: 59[\r][\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> "Cache-Control: no-cache[\r][\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> "Origin:
> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> "User-Agent: Mozilla/5.0
> (Macintosh: Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/39.0.2171.71 Safari/537.36[\r][\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> "Content-Type:
> application/json[\r][\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> "Accept: */*[\r][\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> "Accept-Encoding: gzip,
> deflate[\r][\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> "Accept-Language:
> en-US,en;q=0.8,ta;q=0.6[\r][\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> "Cookie:
> a8c61fa0dc=251e1e57ff3f515d68618b394d194dbd;
> edfb7d8656=9c1fd4635ab50f92ceb89a2f6139a417;
> JSESSIONID=4A7E75C2CF4973B11FA41904382E29DF[\r][\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> "[\r][\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> "{[\n]"
> [2014-12-11 16:53:24,702] DEBUG - wire >> ""EMAIL_ID":"watsa...@yahoo.com
> ",[\n]"
> [2014-12-11 16:53:24,703] DEBUG - wire >> ""PASSWORD":"12345678"[\n]"
> [2014-12-11 16:53:24,703] DEBUG - wire >> "}[\n]"
> [2014-12-11 16:53:25,433] DEBUG - wire << "POST
> https://accounts.zoho.com/apiauthtoken/nb/create HTTP/1.1[\r][\n]"
> [2014-12-11 16:53:25,433] DEBUG - wire << "Accept-Language:
> en-US,en;q=0.8,ta;q=0.6[\r][\n]"
> [2014-12-11 16:53:25,433] DEBUG - wire << "Cookie:
> a8c61fa0dc=251e1e57ff3f515d68618b394d194dbd;
> edfb7d8656=9c1fd4635ab50f92ceb89a2f6139a417;
> JSESSIONID=4A7E75C2CF4973B11FA41904382E29DF[\r][\n]"
> [2014-12-11 16:53:25,433] DEBUG - wire << "Host: invoice.zoho.com[\r][\n]"
> [2014-12-11 16:53:25,449] DEBUG - wire << "Accept-Encoding: gzip,
> deflate[\r][\n]"
> [2014-12-11 16:53:25,449] DEBUG - wire << "Origin:
> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]"
> [2014-12-11 16:53:25,449] DEBUG - wire << "Content-Type:
> application/x-www-form-urlencoded; charset=UTF-8[\r][\n]"
> [2014-12-11 16:53:25,449] DEBUG - wire << "Accept: */*[\r][\n]"
> [2014-12-11 16:53:25,449] DEBUG - wire << "Cache-Control: no-cache[\r][\n]"
> [2014-12-11 16:53:25,449] DEBUG - wire << "Transfer-Encoding:
> chunked[\r][\n]"
> [2014-12-11 16:53:25,449] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
> [2014-12-11 16:53:25,449] DEBUG - wire << "User-Agent:
> Synapse-PT-HttpComponents-NIO[\r][\n]"
> [2014-12-11 16:53:25,450] DEBUG - wire << "[\r][\n]"
> [2014-12-11 16:53:25,450] DEBUG - wire << "5a[\r][\n]"
> [2014-12-11 16:53:25,450] DEBUG - wire <<
> "SCOPE=ZohoInvoice%2Finvoiceapi&accept=text&EMAIL_ID=watsan86%40yahoo.com
> &PASSWORD=12345678[\r][\n]"
> [2014-12-11 16:53:25,450] DEBUG - wire << "0[\r][\n]"
> [2014-12-11 16:53:25,450] DEBUG - wire << "[\r][\n]"
> [2014-12-11 16:53:25,745] DEBUG - wire >> "HTTP/1.1 200 OK[\r][\n]"
> [2014-12-11 16:53:25,745] DEBUG - wire >> "Server: ZGS[\r][\n]"
> [2014-12-11 16:53:25,745] DEBUG - wire >> "Date: Thu, 11 Dec 2014 11:23:25
> GMT[\r][\n]"
> [2014-12-11 16:53:25,745] DEBUG - wire >> "Transfer-Encoding:
> chunked[\r][\n]"
> [2014-12-11 16:53:25,745] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
> [2014-12-11 16:53:25,745] DEBUG - wire >> "X-Content-Type-Options:
> nosniff[\r][\n]"
> [2014-12-11 16:53:25,745] DEBUG - wire >> "X-XSS-Protection: 1[\r][\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "Set-Cookie:
> iamcsr=84dad3b5-e9c2-4dd8-ba99-03bea52480d2; Path=/; Secure[\r][\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "X-FRAME-OPTIONS:
> SAMEORIGIN[\r][\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "Strict-Transport-Security:
> max-age=15768000[\r][\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "[\r][\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "57[\r][\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "#[\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "#Thu Dec 11 03:23:25 PST
> 2014[\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "
> CAUSE=EXCEEDED_MAXIMUM_ALLOWED_AUTHTOKENS[\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "RESULT=FALSE[\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "[\r][\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "0[\r][\n]"
> [2014-12-11 16:53:25,746] DEBUG - wire >> "[\r][\n]"
> [2014-12-11 16:53:25,751] DEBUG - wire << "HTTP/1.1 200 OK[\r][\n]"
> [2014-12-11 16:53:25,751] DEBUG - wire << "Strict-Transport-Security:
> max-age=15768000[\r][\n]"
> [2014-12-11 16:53:25,751] DEBUG - wire << "X-XSS-Protection: 1[\r][\n]"
> [2014-12-11 16:53:25,751] DEBUG - wire << "X-FRAME-OPTIONS:
> SAMEORIGIN[\r][\n]"
> [2014-12-11 16:53:25,751] DEBUG - wire << "Set-Cookie:
> iamcsr=84dad3b5-e9c2-4dd8-ba99-03bea52480d2; Path=/; Secure[\r][\n]"
> [2014-12-11 16:53:25,751] DEBUG - wire << "Content-Type: application/json;
> charset=UTF-8[\r][\n]"
> [2014-12-11 16:53:25,752] DEBUG - wire << "X-Content-Type-Options:
> nosniff[\r][\n]"
> [2014-12-11 16:53:25,752] DEBUG - wire << "Date: Thu, 11 Dec 2014 11:23:25
> GMT[\r][\n]"
> [2014-12-11 16:53:25,752] DEBUG - wire << "Transfer-Encoding:
> chunked[\r][\n]"
> [2014-12-11 16:53:25,752] DEBUG - wire << "Connection: keep-alive[\r][\n]"
> [2014-12-11 16:53:25,752] DEBUG - wire << "[\r][\n]"
> [2014-12-11 16:53:25,752] DEBUG - wire << "81[\r][\n]"
> [2014-12-11 16:53:25,752] DEBUG - wire << "
> {"binary":"IwojVGh1IERlYyAxMSAwMzoyMzoyNSBQU1QgMjAxNApDQVVTRT1FWENFRURFRF9NQVhJTVVNX0FMTE9XRURfQVVUSFRPS0VOUwpSRVNVTFQ9RkFMU0UK"}
> [\r][\n]"
> [2014-12-11 16:53:25,753] DEBUG - wire << "0[\r][\n]"
> [2014-12-11 16:53:25,753] DEBUG - wire << "[\r][\n]"
>
>

-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/
<http://wso2.com/about/team/malaka-silva/>

Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to