China refused all high-level contact with Japan for five years until 2006 in anger at then prime minister Junichiro Koizumi 's annual visits to a Tokyo shrine that venerates Japanese war dead including war criminals .