In a speech marking 40 years of reform, President Xi Jinping also said China would not be dictated to.