axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikki Payne" <>
Subject Changing the http status code in the response
Date Fri, 27 Jun 2008 21:12:26 GMT

I am running a service on  Axis2 v1.4  I am attempting to change the HTTP
status code in the reponse back to the client, but have been unsuccessful so
far. Here's what I am doing :
I get the response object from the messagecontext in the

HttpServletResponse resp =
         if (resp != null) {
             System.out.println("Resp not null ");
             resp.setStatus(503 );
             resp.addHeader("abcd" , "newval11");

Here's the response http header :
HTTP/1.1 *500 *Internal Server Error
Server: Apache-Coyote/1.1
*abcd: newval11*
Content-Type: application/soap+xml; action="";charset=UTF-8

The new header "abcd" does show up, but the status-code remains unchanged to
500 (not 503).

Any help will be greatly appreciated

thank you

View raw message