[SWS-214] Setting Basic Authentication preemptive through CommonsHttpMessageSender Created: 18/Oct/07  Updated: 04/May/12  Resolved: 21/Jul/08

Status: Closed
Project: Spring Web Services
Component/s: Core
Affects Version/s: 1.0.1
Fix Version/s: 1.5.4

Type: Improvement Priority: Major
Reporter: Mike Wiesner Assignee: Arjen Poutsma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


When using CommonsHttpMessageSender in the WebServiceTemplate to support Basic Authentication (with setCredentials()), it should also delegate the Method getParams().setAuthenticationPreemptive(true) from the underlaying HttpClient to avoid a roundtrip and to always use the actual username/password if it changes during the requests.

Currently you can do that with this code:

WebServiceTemplate template = new WebServiceTemplate();
CommonsHttpMessageSender sender = new CommonsHttpMessageSender();
sender.setCredentials(new MyCredentials());

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Mon Nov 19 17:36:26 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.