Announcement Announcement Module
No announcement yet.
Support for new Apache HttpClient Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Support for new Apache HttpClient

    Given that Apache's Common HttpClient project is no longer being supported, can we get support for the new httpcomponents which is successor to it?

  • #2
    Support was added in 3.1.M2. Check out JIRA SPR-6180 for details.


    • #3
      Originally posted by jzcfk9 View Post
      Support was added in 3.1.M2. Check out JIRA SPR-6180 for details.
      I think this is just for the RestTemplate, etc. in core spring. AFA SWS is concerned, see SWS-563. Starting with the patch attached to that issue, I used 4.1 with the WebServiceTemplate (I needed the NTLM auth impl). The two issues (as noted in the jira issue) are: no support for streaming the response (and maybe the request as well), and a hack to remove the Content-Type header added upstream within SWS.

      If I'm wrong, someone please correct me.


      • #4
        Thanks to this post and SWS-563 I was able to implement NTLM authentication for my web service!

        A colleague of mine was researching for this as well and he came up with this Authentication functionality which is in Java by default. I haven't seen it during my research, but I'd like to share this with others who need to implement NTLM authentication. It can be done in a few lines, without using httpclient:

        Check out:

        final String userName= "domain\\username";
        final String password = "password";
        Authenticator.setDefault(new Authenticator() {
        	public PasswordAuthentication getPasswordAuthentication() { 
        		return new PasswordAuthentication(userName, password.toCharArray()); 
        Last edited by evandongen; Sep 22nd, 2011, 07:50 AM. Reason: Made a mistake with copy/pasting :)