I am relatively new to Wink and trying to debug a defect in which a POJO that contains a byte array is [I think] being improperly serialized into json for the response. By improperly I mean that I have unicode characters stored as a blob that have been extracted into the byte array and when the byte array is serialized into json, it is being decoded as something other than the UTF-8 characters the unicode bytes should represent.
In trying to trace this problem, I've validated that the bytes look as I expect them to up to the point where they are returned from my request resource. My @GET request resource method returns a List. I understand from reading the guide that
- RequestHandler chain is executed and ultimately invokes my resource method...
- The return from the resource method (@GET in this case) is supposed to go into the messagecontext which is passed to the ResponseHandler chain, I think...
My concern is that the contents of the pojo returned by my resource method, which contains a byte[], is not being serialized correctly and is producing invalid json content which is being sent to the user. How does my returned List get into the messageContext?
I am unable to attach a debugger to the machine running this application.