protected HttpResponse buildFailureResponse(HttpVersion version, int statusCode, String description) throws MuleException
{
HttpResponse response = new HttpResponse();
response.setStatusLine(version, statusCode);
response.setBody(description);
DefaultMuleEvent event = new DefaultMuleEvent(new DefaultMuleMessage(response, connector.getMuleContext()), (InboundEndpoint) endpoint,
new DefaultMuleSession(flowConstruct, connector.getMuleContext()));
RequestContext.setEvent(event);
// The DefaultResponseTransformer will set the necessary headers
return transformResponse(response, event);
}