Beijing said its relationship with Iran "should not be disrupted or undermined" and that China will take "all necessary measures" to safeguard its interests.