Thai and Cambodian soldiers exchanged rocket and rifle fire for about an hour in a confrontation at their border over claims to a 900-year-old mountaintop temple.