When debugging some web-service client code today (in Java, with jax-ws) I ran across a web-service method with the mind-blowing amount of 97 parameters!
I had to create a test case that calls this method, and I noticed several things:
- code assist/hover doesn't scale well. I am using Eclipse, and the tooltip over the method is as wide as the screen and spans several lines.
- I had to copy parameters values from a previous xml capture, and it was practically impossible to remember "where am I" - when I had the cursor located after a comma and before typing some value, I often got the data type wrong - I typed an Integer instead of a String and vice versa.
- Even after I wrote all the parameters, I still had some errors and the signature didn't match. Unfortunately Eclipse marks the whole line in red as having an error, so finding where the mistake was took even more time :(
So this got me thinking, what do you think is the maximum sane number of parameters for a method? And if you could change this web-service signature, how do you think it can be improved?