  We study two-dimensional classically integrable field theory with independent
boundary condition on each end, and obtain three possible generating functions
for integrals of motion when this model is an ultralocal one. Classically
integrable boundary condition can be found in solving boundary $K_{\pm}$
equations. In quantum case, we also find that unitarity condition of quantum
$R$- matrix is sufficient to construct commutative quantities with boundary,
and its reflection equations are obtained.
