The Wallaroos have secured their first win of the 2017 Rugby World Cup with a 29-15 victory over a tenacious Japan side.