how did china and japans decisions to respond to the west affect its foreign and domestic affairs?