Hi,
Came across this thread since I had the same issue minutes ago.. believe or not, here it was just a matter of SAP being SAP...
Case you are doing:
connection.setDoInput(true);
connection.setDoOutput(true);
Comment those out, and it should work.. (NW 7.40) - Please let me know if that works for you...
Cheers,
D.