I'm getting following error while requesting json response from my dss service.
{"Fault":{"faultcode":"soapenv:Server","faultstring":"Error while writing to the output stream using JsonWriter","detail":""}}
curl request which i pass is
curl -X GET -H "Accept:application/json" -H "Content-Type:application/json" http://localhost:9764/services/userdetails/test
I am getting the proper xml response if i remove accept header.
Strange thing is if i am running the same dss service from my colleague's laptop, i m getting the proper json response with that above curl command. Some configuration has changed in my pc because of that i'm getting this error in my pc.
I am not able to find what has changed in my pc because of which i'm getting this error.
I also experienced the same recently. I was hoping to debug and find the cause, but didn't get a chance yet.
However, changing
application/json
formatter and sender implementations inrespository/conf/axis2/axis2.xml
resolved the issue. For that, you can uncomment/comment-out followings.Hope this will help.