简体   繁体   中英

WSO2 API manager returns binary response

I am very new to WSO2 API manager and trying out my very first simple restful api. which returns json response and has no security since it is an internal api.

I installed WSO2 API manager locally and trying to call the rest api on my dev server which uses http and no security as I mentioned earlier.

Here is how my get url looks like: 在此处输入图片说明

and here is my url looks like for production and sandbox environment: 在此处输入图片说明

I don't have any message mediation enabled.

I went to the API store and created a trial application (so that I can get the access token. Eventhough, my dev environment api has no security, I was reading that for throttling and other purpose, I need to pass bearer token to the WSO2 api OR it will reject the request.)

When I am trying to consume the api, I get the following binary message. 在此处输入图片说明

Is there any way I can see the proxy log on WSO2 server so that I can see the request and its header sent to my dev server? How can I fix this binary response to get the proper json response?

I searched all over and can't find solution to it.

You can use below steps on WSO2 ESB or APIM to enable Wire Logs.

  1. Uncomment below line in /repository/conf/log4j.properties

log4j.logger.org.apache.synapse.transport.http.wire=DEBUG

  1. Restart Server.

Source - http://lakshanigamage.blogspot.com/2015/03/how-to-enable-wire-logs-in-wso2-esbapim.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM