  The anisotropic spin-1/2 chains with arbitrary boundary fields are
diagonalized with the off-diagonal Bethe ansatz method. Based on the properties
of the R-matrix and the K-matrices, an operator product identity of the
transfer matrix is constructed at some special points of the spectral
parameter. Combining with the asymptotic behavior (for XXZ case) or the
quasi-periodicity properties (for XYZ case) of the transfer matrix, the
extended T-Q ansatzs and the corresponding Bethe ansatz equations are derived.
