public Object invoke(MethodInvocation methodInvocation) throws Throwable {
if (AopUtils.isToStringMethod(methodInvocation.getMethod())) {
return "JMS invoker proxy for service URL [" + getServiceUrl() + "]";
}
LingoInvocation invocation = (LingoInvocation) createRemoteInvocation(methodInvocation);
MethodMetadata metadata = invocation.getMetadata();
replaceRemoteReferences(invocation, metadata);
try {
Message requestMessage = marshaller.createRequestMessage(requestor, invocation);
populateHeaders(requestMessage);
if (metadata.isOneWay()) {
requestor.oneWay(destination, requestMessage);
return null;
}
else {
Message response = requestor.request(destination, requestMessage);