Path integral representation of generalized nonlinear schroudinger equations—application to optical soliton problems