Hello:

Is it possible to explicitly set the HTTP response code from within an SEI
implementation?  I'm creating a RESTful interface, and it looks like a good
approach ("RESTful Web Services", Richardson & Ruby, O'Reilly, 2007) is to
use a variety of HTTP response codes. Like, if a given ID for  a GET request
does not refer to an existing object, one can return status code 404 (not
found) with no entity body.

Right now, I can throw an exception and have the fault info marshaled as the
entity body. But, the response code is always 500 (internal server error).
I'm doing this based on the restful_http_binding sample code.

Anyway, within the SEI implementation, I have the request object, and I'm
populating the response object. Beyond throwing an exception, how do I
influence what CXF returns response code/body wise.

Thanks!

Jeff
-- 
View this message in context: 
http://www.nabble.com/Setting-the-HTTP-response-code-tp14960063p14960063.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to