what you want to do is visa free transit - as outlined here:
http://www.china-embassy.org/eng/hzqz/zgqz/t84242.htm
the immigration officers often have to ask their supervisors, as they are unsure about this so make sure they do not use one of the visa entries...