3. The defendant, in any case that would formerly have been a case of felony, shall not obtain subpoenas for necessary witnesses for his defence without payment of fees, unless upon the order of some judge of the court in which the case is to be tried, or of the prosecuting officer in the case. Such order shall be granted on the sworn deposition of the defendant that he is poor and needy, and that such witnesses are necessary to the defence; and the lawful fees of the proper officer issuing such subpoenas shall then be paid; but no expenses of serving such subpoenas shall be paid out of any public money.
In cases of offences less than those formerly ranked as felonies, no expenses for subpoenas or service of subpoenas on the part of the defendant shall be paid out of any public money, in whatever court such case be tried.