Tokyo and Beijing are in the midst of a row over comments made by the Japanese prime minister about Taiwan.