MuleMessage message = createMuleMessage(args);
// Some transports such as Axis, RMI and EJB can use the method information
message.setInvocationProperty(MuleProperties.MULE_METHOD_PROPERTY, method.getName());
InterfaceBinding router = routers.get(method.getName());
if (router == null)
{
router = routers.get(DEFAULT_METHOD_NAME_TOKEN);
}
if (router == null)
{
throw new IllegalArgumentException(CoreMessages.cannotFindBindingForMethod(method.getName()).toString());
}
MuleEvent currentEvent = RequestContext.getEvent();
MuleEvent replyEvent = router.process(new DefaultMuleEvent(message,currentEvent));
if (replyEvent != null && !VoidMuleEvent.getInstance().equals(replyEvent)
&& replyEvent.getMessage() != null)
{
MuleMessage reply = replyEvent.getMessage();