Whenever it shall appear to any court granting a restraining order or an order of injunction, or by affidavit, that any person has willfully disobeyed the order after notice thereof, such court shall award an attachment for contempt against the party charged, or an order to show cause why it should not issue. The attachment or order shall be issued by the clerk of the court, and directed to the sheriff, and shall be served by him or her.