I don't understand why the code compiles in the first place.
The setParameter has setParameter(
String parameterName, String parameterValue) -- however it belong to the PostMethod
class. getParams() returns a HttpMethodParams which does not have any method called as setParameter().