This is one of the all-time great perennial questions.
Opinions differ. There are apparently programs that can handle simple .wav files (for example, those containing a melody played by a single solo instrument). The consensus opinion, though, is that it's not really possible to write a program to generate a MIDI file from an arbitrary .wav file.
For much more on this check out these threads:
http://my.noteworthysoftware.com/?topic=1064,
http://my.noteworthysoftware.com/?topic=997,
http://my.noteworthysoftware.com/?topic=850,
http://my.noteworthysoftware.com/?topic=845. I found these by searching the offline forum. I know there are some more recent postings too, but they're eluding me at present.