Two French soldiers were wounded in a knife attack in the city of Nice on Tuesday, a police source said.