Is it possible to return a List<String> as a JAXB response directly without wrapping it in a response object? E.g.,
public List<String> foo(Bar bar) {
return restTemplate.postForEntity("http://foo.com/bar", bar, List.class);
}
Currently I get the error
Could not write request: no suitable HttpMessageConverter found for request type [my.pkg.Bar]
The HttpMessageConverters are properly configured as other GET/POST requests with Bar works.
I’ve only been able to get this working with String[].class as the type.