You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@wink.apache.org by srinivasan venkat <sr...@yahoo.com> on 2010/10/11 10:06:56 UTC

invalid Status Code in Response header.

Hi,
 
I am using ibm wink jars and rational IBM websphere server for my restful service development.

I use RestClient to test my restful implementation.
 
Sometimes I get,
Status Code : 500 OK in the Response header.
 
But Response body is loaded with content and response status is OK.
We are not setting status code 500 in our implementation.
 
Any websphere configuration needed in this case to avoid ?.
Need help to avoid this status code 500 that set in the response header even the content is present in response body.
 
Thanks,
Srinivasan.V


Re: invalid Status Code in Response header.

Posted by Bryant Luk <br...@gmail.com>.
I'm not immediately sure how you get a 500 OK.  Wink doesn't set any status
message, it only sets the status code.  There are a few instances where a
500 Server Internal Error response status code is set in the response
automatically (instead of you returning a 500 in your Response object) and
you still get content.

1)  You throw a WebApplicationException.

2)  You throw an uncaught exception and it's propagated to the web
container.

Can you check to make sure that the above is not happening?

Please note that for official IBM support, you should use their standard
processes.

On Mon, Oct 11, 2010 at 3:06 AM, srinivasan venkat <sr...@yahoo.com>wrote:

> Hi,
>
> I am using ibm wink jars and rational IBM websphere server for my restful
> service development.
> I use RestClient to test my restful implementation.
>
> Sometimes I get,
> Status Code : 500 OK in the Response header.
>
> But Response body is loaded with content and response status is OK.
> We are not setting status code 500 in our implementation.
>
> Any websphere configuration needed in this case to avoid ?.
> Need help to avoid this status code 500 that set in the response header
> even the content is present in response body.
>
> Thanks,
> Srinivasan.V
>
>