I think it will be work, but need more violent conditions(e.g.high temp. or sealed in tube).
I have ever prepared a secondary alcohol, which had been extracted from water with Ethyl acetate. When the extraxts were concentrated under reduced pressure,transesterification reaction occured.
Due to more basic/nucleophilic than aliphatic achohol, aniline will react with EtOAc in same conditions.