I have been beating my head against this one for a few hours now...
WebConversation wc = new WebConversation();
WebRequest req = new GetMethodWebRequest("http://www.gracenote.com/music/index_old.html");
WebResponse resp = wc.getResponse(req);
WebForm searchForm = resp.getFormWithName("search");
searchForm.setParameter("q", URLEncoder.encode(artist + " " + title, "UTF-8"));
WebResponse webResponse = searchForm.submit();
For some reason, this died at submit about 99% of the time. It end up spitting back a load of script gibrish, which is caught and returned in the log. The other 1% of the time that it doesn't die there, it doesn't work anyway, because the original code is defective and I haven't fixed it yet.
The code defect takes place when the search returns multiple possibilities for the song info. The only time tags work right now is when: a)the fetch doesn't break and b)the search returns only the definative result.
If ANYONE has ANY experience with these web functions, please let me know and give me a hand. I am proficient with java, but this part is getting me...