java - RestyGWT + Jersey Error 500 when sending a not null or empty List -


say have jersey resource similar this:

@path("/test") public class testresource{     @post     @consumes(mediatype.application_json)     @produces(mediatype.application_json)     public response test(list<jsonrepresentation> json){     //some logic gives different responses, strings     } } 

and restygwt service consumes this:

@path("api/test") public interface testservice extends restservice{  @post public void test(list<jsonrepresentation> json, methodcallback<string> callback); } 

the thing that, when try access resource using service, if list isn't null or empty internal server error doesn't have server code because can't debug test method logic.

however, when list null or empty, resource's logic should , can debug without problems.

the contents of jsonrepresentation don't seem matter problem.

i have no idea why happening , couldn't find similar questions around, appreciated.

if want send strings client, change code to:

@path("/test") public class testresource{     @post     @produces(mediatype.application_json)     public string test(list<jsonrepresentation> json){       //some logic gives different responses, strings     } } 

and change code of resource to:

@path("api/test") public interface testservice extends restservice{     @post    public void test(list<jsonrepresentation> json, textcallback callback);    } } 

hope helps.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -