  Let $X$ be a (real or complex) rearrangement-in\-va\-riant function space on
$\Om$ (where $\Om = [0,1]$ or $\Om \subseteq \bbN$) whose norm is not
proportional to the $L_2$-norm. Let $H$ be a separable Hilbert space. We
characterize surjective isometries of $X(H).$ We prove that if $T$ is such an
isometry then there exist Borel maps $a:\Om\to\bbK$ and $\sigma:\Om\lra\Om$ and
a strongly measurable operator map $S$ of $\Om$ into $\calB(H)$ so that for
almost all $\om$ $S(\om)$ is a surjective isometry of $H$
  and for any $f\in X(H)$ $$Tf(\om)=a(\om)S(\om)(f(\sigma(\om))) \text{ a.e.}$$
  As a consequence we obtain a new proof of characterization of surjective
isometries in complex rearrangement-invariant function spaces.
