William John Smith joined the Dorset Regiment in July 1884. He served in various places at home and overseas, his last posting (Egypt) coming to an end in April 1892. He was then transferred to the Army Reserve, but was struck off "for absence" on 30 September 1895.
I can't easily see what became of him after that, but if he disappeared rather than died it may be that his wife Elizabeth was not free to marry Alfred Gates.