The gauge theory of dislocations: Static solutions of screw and edge dislocations