Hello
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
MessageReceiverInOut
HttpServletResponse resp =
(HttpServletResponse)
msgContext.getCurrentMessageContext().getProperty(org.apache.axis2.transport.http.HTTPConstants.MC_HTTP_SERVLETRESPONSE);
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="
http://www.w3.org/2005/08/addressing/soap/fault";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
-nikki