Hello,
I have the following problem but did not find any solution / hint on
it, looking into How tos / querying Google / Yahoo:
Using Jersey for a RESTful webservice we choose to use an
ExceptionMapper to translate exceptions into the desired format ( XML /
JSON). While this works completely as intended for post, get and
delete, there are problems with PUT requests.
Writing a test case that expects an exception everything is fine up to
the REST method (I debugged to verify that the expected exception is
coming and that the exception mapper is called). But on the client
side, I only get the HTTP status, but no entity / header containing the
exception. Is that due to some misconfiguration /bug or is it
intentionally?
Can I change this behaviour? If that can not be changed what is the
correct way to dela with it? Having started to read in the w3c RFC for
HTTP 1.1 and a book about REST and HTTP I do not remember any hint on
PUT like "do not give a response entity in case of a problem, instead
..."
Platform:
Jersey version 1.5 (Maven dependency to jersey-bundle, version 1.5)
Ubuntu Linux, 64 bit with 64 bit Eclipse, 64 bit Java, 8 GB RAM, core
i5-760, SSD Corsair F40.
If requested I can give more details about the platform, but by now I
save the time cause it feels like a software problem not depending on
my platform.
With kind regards Sebastian Oerding