} else {
parameter=new Object[]{};
}
result=callServiceMethod(serviceName, methodName,parameter);
} catch (ServiceNotAvailableException e) {
throw new MessageRoutingException("service not available",e);
} catch (NoSuchMethodException e) {
throw new MessageRoutingException("service not available.no such method",e);
} catch (IllegalAccessException e) {
throw new MessageRoutingException("failed to invoke service",e);
} catch (InvocationTargetException e) {
throw new MessageRoutingException("failed to invoke service",e);
}
} else {
throw new MessageRoutingException("no service registry set");
}
} catch (NoValidEndpointException e) {
throw new MessageRoutingException("syntax errror parsing Message",e);
}
}
return result;
}