I recently read an article on this subject in one college academic journal of East Asia Studies.I want to share some details here.
Wang Xiao Fu of the Beijing University found out that the
name of Nippon was actually enfeoffed to Japan by Chinese Empress Wu ZeTian ( 武则天 ) in the seventh mission in 701 AD,
not the sixth mission in 669. The reason is that the Tong Dian recorded the date to be 701, while the version in 舊唐書 ( old Tang history chronicle ) was ambiguous.It stated that Japan came to the Tang Court to congradulate the pacification of Koguryo in the sixth mission, and afterwards,Empress Wu enfoeffed the title of Japan. Therefore, the date of the enfeoffment is most probably 701 AD and not 670 AD as traditionally thought.
http://en.wikipedia.org/wiki/Wu_ZetianChina's Tang Court didn't actually create the name for Japan.
Japan proposed what it wanted to be called, and its up to Tang to grant that permission.The Chinese Wu dialect word for Nihon sounded something like "
Zeppen" (modern Shanghainese still pronounces Nihon that way).
The international system of East Asia at that time was centered around the Tang Court at Da Ming Palace.( similar to the modern UN )
States in the tributary system were either enfeoffed or renamed after they propose what they want to be referred as.When Korea's Koryo Kingdom wanted to be successor of the ancient collapsed Koguryo, it was accepted by the Chinese Imperial Court, but when Vietnam wanted to be referred to as Nan Yue during the Qing Dynasty, it was turned down.This enfeoffment doesn't change how these states called themselves, but in relationship to other states that were under the tributary system, they
needed the investiture of the Chinese Imperial Court.According to Chinese sources.In 608,it was Japanese Empress Suiko 推古天皇 wrote a letter to Chinese Emperor Sui Yangdi 隋煬帝 referring to herself as " Emperor of Heaven of the Land where the Sun Rises 日出處天子".So, it seems that the Japanese perception of themselves as living in the " land of the origin of the sun " was already around at that time.