A method for the solution of an axisymmetric magnetic field synthesis problem