Skip to content

Commit ea99a30

Browse files
AXIS2-6061 make it easier to customize the error response
1 parent e127405 commit ea99a30

File tree

1 file changed

+4
-0
lines changed
  • modules/transport/http/src/main/java/org/apache/axis2/transport/http

1 file changed

+4
-0
lines changed

modules/transport/http/src/main/java/org/apache/axis2/transport/http/AxisServlet.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,10 @@ protected void handleFault(MessageContext msgContext, OutputStream out, AxisFaul
458458
(HttpServletResponse) msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE);
459459
if (response != null) {
460460

461+
// AXIS2-6061 make it easier to customize the error response in the method writeTo()
462+
// of the Message Formatter classes ... HTTPConstants.RESPONSE_CODE was until now unused
463+
faultContext.setProperty(HTTPConstants.RESPONSE_CODE, response.getStatus());
464+
461465
//TODO : Check for SOAP 1.2!
462466
SOAPFaultCode code = faultContext.getEnvelope().getBody().getFault().getCode();
463467

0 commit comments

Comments
 (0)