China warned against turning outer space into a "battlefield" after the U.S. confirmed that it has weapons deployed in space.