Ariz. Rev. Stat. § 13-4111
A. When an issue of fact is joined upon an indictment or information, the defendant may have any material witness residing without the state examined in his behalf, as prescribed in this article, upon application to the court in which the action is pending, supported by an affidavit showing: