users@jersey.java.net

[Jersey] How to set http status when server returns a jaxb bean after processing post?

From: <pengfei.di_at_match2blue.com>
Date: Fri, 11 Mar 2011 07:43:37 +0000 (GMT)

Hello Group,

I am learning Jersey and encounter a problem: how can I modify the
status in HttpHeader when the server returns a jaxb bean after
processing a post request? The status is OK(200), but I think it would
be better with CREATED(201).

I found some suggestions from the Internet, which use Response as the
return type and set the status directly in the Response. However I
prefer to using jaxb bean as the return type for clean API and
documentation.


Thanks a lot in advance.

Regards
Pengfei