We use RestEasy 1.0.2.GA on JBoss 4.3.0.GA_CP02. We have a RESTful WS that takes XML as input in the POST request body. We use the RestEasy default content marshalling to unmarshall the incoming XML into JAXB annotated Java classes. Things work fine if only valid xml is sent in to the service. However, when the XML in the http request is malformed (or invalid), RestEasy throws a WebApplicationException and returns 500 to the client. Since the input is invalid (malformed XML), the client should get 400 (bad request) instead of 500 (internal server error).
I think the only way to bypass the above problem is to unmarshall and marshall the XMLs manually (using JAXB).
Original post: http://sourceforge.net/mailarchive/forum.php?thread_name=49D3E1E1.9010504%40redhat.com&forum_name=resteasy-developers