If the court or judge is satisfied that the examination of the witness is necessary, an order must be made that the witness be examined conditionally, at a specified time and place, and that a copy of the order be served on the prosecuting attorney, within a specified time before that fixed for the examination.