doService2(request, response, msgContext);
} catch (Throwable e) {
String msg = "Exception occurred while trying to invoke service method doService()";
LOG.error(msg, e);
try {
AxisEngine engine = new AxisEngine(this.configurationContext);
msgContext.setProperty(MessageContext.TRANSPORT_OUT, response.getOutputStream());
msgContext.setProperty(Constants.OUT_TRANSPORT_INFO, new Axis2TransportInfo(response));
MessageContext faultContext = MessageContextBuilder.createFaultMessageContext(msgContext, e);
// If the fault is not going along the back channel we should be 202ing
if (AddressingHelper.isFaultRedirected(msgContext)) {
response.setStatusCode(HttpURLConnection.HTTP_ACCEPTED);
} else {
response.setStatusCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
}
engine.sendFault(faultContext);
} catch (Exception ex) {
if (AddressingHelper.isFaultRedirected(msgContext)) {
response.setStatusCode(HttpURLConnection.HTTP_ACCEPTED);
} else {
response.setStatusCode(HttpURLConnection.HTTP_INTERNAL_ERROR);