Remove dependency on CXF
Closed this issue · 1 comments
viniciusccarvalho commented
Litle client has a dependency on CXF that seems completely unnecessary. There's one line of code at the end that copies from the response (InputStream) into a String, using an IOUtils. This brings the whole CXF framework as a dependency. And in case you have your client running with other JAX-WS or JAX-RS framework, it will simply not work due some nasty classpath problems.
We fixed this by upgrading to the httpclient 4 which has a nice EntityUtils.toString(Inputstream) method.
I've created a gist at: https://gist.github.com/3939957 with that.
Please note we could make this even beter by making the HttpClient a private variable, and just creating BasicContext per invocation.
Regards