code: public T waitForResult ()
          throws ServiceException
      {
          try {
              if (waitForResponse()) {
                  return getArgument();
              } else {
                  throw getError();
              }
  
          } catch (InvocationException ie) {
              // pass these through without a fuss
              throw new ServiceException(ie.getMessage());
  
          } catch (Exception e) {
              log.warning(_ident + " failed.", e);
              throw new ServiceException(InvocationCodes.E_INTERNAL_ERROR);
          }
      }
docs: Waits for our asynchronous result and returns it if all is well. If
  anything goes wrong (a timeout or a asynchronous call failure) the
  exception is logged and a {@link ServiceException} is thrown.