I have a REST service that accepts JSON in the request body. The method is defined as follows:
In the body of the request is a list of JSON objects representing ShoppingListItem objects, and this works fine. However, I would expect it also to work if the request body is empty--that the items variable would simply be null. However I get a 500 error before it even reaches my service when I post a request with an empty body.
I guess you are using Jersey, and in that case Jersey won't be able to find the matching method to call.
As far as I know, this is expected but I would wait for some experts to shed some more lights here.