I am using RestTemplate to make calls to a web service.
String userId = restTemplate.getForObject(createUserUrl, String.class);
If this fails to return a user ID I just get returned null but I don't know why. How do I output the actual XML response to a log?
Interface ClientHttpRequestInterceptor This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference. @FunctionalInterface public interface ClientHttpRequestInterceptor. Intercepts client-side HTTP requests.
Depending on which method of making the HTTP connection you are using, you could look at turning up the logging within the actual HTTP connection classes.
For example, if you are using commons HttpClient, you can set
log4j.logger.httpclient.wire=DEBUG
The commons-httpclient project has an entire page in the documentation on their logging practices.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With