This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

nested exception is org.springframework.web.client.ResourceAccessException: I/O error

 
rama kammari
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




I want to access webservice by calling an URL (webservice URL) through my company proxy,
I am getting this error in my server, and on my browser : I/O error: Connection refused
i wrote this code in my RestfulClient class




 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not really a question about Spring or RestTemplate but about Apache Commons HTTP Client. I would use the HttpComponentsClientHttpRequestFactory instead and upgrade to Apache HTTP Components. The version you are using is no longer supported. That said I would talk to other members of your organization about how they typically work with the proxy, perhaps the method you are using is not correct, or sometimes the preferred method is to apply for a proxy exception for your application. Either way RestTemplate will just use what you have configured.

See this link and see if it will help you.

http://stackoverflow.com/questions/6962047/apache-httpclient-4-1-proxy-authentication
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic