Exact analysis of an edge dislocation near a surface layer