Ok so what is null the inputStream? It would really help if you posted the stack trace so that we can debug this a bit easier.
While you are working on getting that stack trace for us I will give you a few other alternatives for handling stuff like this:
First of all you can get rid of just about all of that code by using RestTemplate instead of httpClient. RestTemplate can be configured to use HttpClient to do its work but by default it just uses the standard
java net stuff.
Read this blog to get acquainted
http://blog.springsource.org/2009/03/27/rest-in-spring-3-resttemplate/
Now your rest call and unmarshalling will be reduced to one line:
Also if you are using 3.1.1 they added a packages to scan to org.springframework.oxm.jaxb.Jaxb2Marshaller which makes the oxm namespace useless and removes the need to define the pesky classes to be bound for every single object. To use that just declare a bean of type
org.springframework.oxm.jaxb.Jaxb2Marshaller and set the package(s) to scan for your JaxB annotated objects. After you do this either autowire or wire this bean into any class as you marshaller/unmarshaller. Remember you do need the very latest Spring for this one, RestTemplate has been there since 3.0 though.