We introduce generalizations of type C and B ice models which were recently introduced by Ivanov and Brubaker-Bump-Chinta-Gunnells, and study in detail the partition functions of the models by using the quantum inverse scattering method. We compute the explicit forms of the wavefunctions and their duals by using the Izergin-Korepin technique, which can be applied to both models. For type C ice, we show the wavefunctions are expressed using generalizations of the symplectic Schur functions. This gives a generalization of the correspondence by Ivanov. For type B ice, we prove that the exact expressions of the wavefunctions are given by generalizations of the Whittaker functions introduced by Bump-Friedberg-Hoffstein. The special case is the correspondence conjectured by Brubaker-Bump-Chinta-Gunnells. We also show the factorized forms for the domain wall boundary partition functions for both models. As a consequence of the studies of the partition functions, we obtain dual Cauchy formulas for the generalized symplectic Schur functions and the generalized Whittaker functions. *