Spain’s Pedro Sánchez and China’s Xi Jinping stressed respect for international law and a shared “sense of justice”.