O
O
Oleg Yakovenko2011-12-12 14:28:08
JavaScript
Oleg Yakovenko, 2011-12-12 14:28:08

Response from REST service returns null in callback

Good day. Made a small REST service, the result of which is javax.ws.rs.core.Response containing image/base64 content.
In the remote debug server, everything is ok, the response contains my picture.
when passing JSON'a from the server to the client's javascript
success : function(data, text, xhr)
in data, I get null, but in xhr.responseText there is my response that I generated in the java code.
Tried annotations and media type same result. In more detail: REST service is a service for a gadget (and plugin) in JIRE, if it somehow helps someone. The code is mine, so I welcome any options, even the scariest ones.
@GET
@Path("/getChart")
@Produces(MediaType.APPLICATION_JSON)


Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
burivuh, 2011-12-20
@burivuh

Is the JSON generated valid? Is the Content-type header given correct with the response?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question