{
logger.debug(message.getInboundProperty(HttpConnector.HTTP_REQUEST_PROPERTY));
}
// determine if the request path on this request denotes a different receiver
final MessageReceiver receiver = getTargetReceiver(message, endpoint);
HttpResponse response;
// the response only needs to be transformed explicitly if
// A) the request was not served or B) a null result was returned
if (receiver != null)
{
String contextPath = HttpConnector.normalizeUrl(receiver.getEndpointURI().getPath());
message.setProperty(HttpConnector.HTTP_CONTEXT_PATH_PROPERTY,
contextPath,
PropertyScope.INBOUND);
message.setProperty(HttpConnector.HTTP_CONTEXT_URI_PROPERTY,
receiver.getEndpointURI().getAddress(),
PropertyScope.INBOUND);
message.setProperty(HttpConnector.HTTP_RELATIVE_PATH_PROPERTY,
processRelativePath(contextPath, path),
PropertyScope.INBOUND);
ExecutionTemplate<MuleEvent> executionTemplate = createExecutionTemplate();
MuleEvent returnEvent;
try
{
returnEvent = executionTemplate.execute(new ExecutionCallback<MuleEvent>()
{
@Override
public MuleEvent process() throws Exception
{
preRouteMessage(message);
return receiver.routeMessage(message);
}
});
}
catch (MuleException e)
{