Say I have a Jersey Resource somewhat similar to this:
@Path("/test")
public class TestResource{
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response test(List<JSONRepresentation> json){
//some logic that gives different responses, all just Strings
}
}
And a RestyGWT Service that consumes it like this:
@Path("api/test")
public interface TestService extends RestService{
@POST
public void test(List<JSONRepresentation> json, MethodCallback<String> callback);
}
The thing is that, when I try to access the Resource using the Service, if the List isn't null or empty I get an Internal Server Error that doesn't have anything to do with the server code because I can't even debug the test method logic.
However, when the List is null or empty, the Resource's logic does what it should and I can debug it without any problems.
The contents of the JSONRepresentation don't really seem to matter for this problem.
I have no idea why this is even happening and I couldn't really find any similar questions around, any help would be really appreciated.