Have you tried re-configuring the printer to join the wireless network using the printer's control panel? It's possible you may need to reset the printing system and start over (all printers will be deleted and need to be added again).
As regards getting the iPhone to print - is the printer Airprint capable? If not, you should be able to get it to work by installing something such as this:
http://www.netputing.com/applications/handyprint-v4-1/ (there are alternatives available)