123 is an invalid user id
curl --include http://localhost:9090/testService/users/123
HTTP/1.1 200 OK
Content-Type: text/xml
Content-Length: 0
Server: Jetty(6.1.8)
scouredimage wrote:
>
> Hi All,
>
> Looking at the JAX-RS 0.6 spec for Return Type (Section 2.2.2):
> Other: Results in an entity body mapped from the return type. If the
> return value is not null a 200 status 26
> code is used, a null return value results in a 204 status code.
>
> However, I don't see this working on 2.1. Either that, or I am doing
> something stupid.
>
> @Path("/users/")
> Public class UserService {
> @GET
> @Path("{id}")
> public User getUser(@PathParam("id") Integer id) {
> ...
> if(notFound) {
> return null;
> }
> return user;
> }
> }
>
> Any pointers?
>
> Thanks in advance.
>
--
View this message in context:
http://www.nabble.com/JAX-RS-Return-type-tp17256757p17257245.html
Sent from the cxf-user mailing list archive at Nabble.com.