Three soldiers on patrol outside a Jewish community centre in southern France were attacked by a knife-wielding assailant on Tuesday, leaving two of them injured, a police source said.