Library like URIBuilder (Apache http client) would make it simpler to manipulate the parameters (the Apache HTTP client version, not the Java WS version).