There are several versions of the DOFObject.invoke() method; however, DOFObject.invoke(DOFInterface.Method method, int timeout, DOFValue... inputValues) is the simplest.
The timeout parameter specifies how long to wait for a response before the operation fails. If you don't want it to time out, use DOF.TIMEOUT_NEVER.