if(timeout > 0){
WaitResponse<WampCallResultMessage> wr = new WaitResponse<WampCallResultMessage>();
call(procId,wr,timeout,args);
WampCallResultMessage result;
try {
result = wr.call();
} catch (Exception e) {
if(log.isErrorEnabled())
log.error("Error waiting call result : ",e);
return null;
}
if(result != null){
if(result instanceof WampCallErrorMessage)
throw new CallException((WampCallErrorMessage)result);
else
return result.getResults();
}
throw new TimeoutException();
}