code: @Override
      public Object invoke(String methodName, Argument[] paras, String returnType) throws RemoteException {
          log.trace("Invoking method: " + methodName);
          String soapMsg = marshall(methodName, paras);
          InputStream is = null;
          try {
              is = post(soapMsg);
              log.trace("Converting xml response from server to: " + returnType);
              return unMarshall(returnType, is);
          }
          catch (Exception e1) {
              log.error("Exception caught while invoking method.", e1);
              throw new RemoteException("VI SDK invoke exception:" + e1, e1);
          }
          finally {
              if (is != null) {
                  try {
                      is.close();
                  }
                  catch (IOException ignored) {
                  }
              }
          }
      }
docs: Invoke a given method with supplied {@link com.vmware.vim25.ws.Argument} on the remote vi server.
  This method typically creates the payload needed to send to the vi server. For example you would
  pass in RetrieveServiceContent for the methodName, next the params needed for the method. Next give
  the returnType the parser should convert the response to in this case the string ServiceContent
  <p>
  Returns an {@link Object} of the given return type. Using the example above you would get
  a {@link com.vmware.vim25.ServiceContent} Object.
  <p>
  
  @param methodName Name of the method to execute
  @param paras      Array of Arguments aka params for the method
  @param returnType String name of the return type
  @return Object
  @throws java.rmi.RemoteException