Static axially symmetric sources of the gravitational field