Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Axis HTTP Proxy Settings

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have three web services to be accessed from my machine. The first two are located on a node that is connected to same LAN that my machine is connected on. And the third one is reachable over the internet and is used to send SMS messages.
In order to reach the third message, I have to set the http proxy settings for the web service client using the following code:


Whereas the first two services doesn't need this proxy setting because they're already reachable on the network.

My problem is as follows:
If I call one of the first two services (with no proxy setting) and then call the third one (with proxy setting), then everything works fine, and any subsequent calls to any of the three services works perfectly.

On the other hand, if I call the third service first (the one with the proxy setting), and then call one of the other two, the Axis client tries to call these services with the same proxy setting, even if I remove the proxy setting from the System properties and AxisProperties:


The problem in this case is that if the proxy server is unavailable for any reason, I can't access the other two services because the proxy setting is stuck somehow in the Axis Engine instance. So eventually I'm getting this exception:


Is there a way to resolve this?
 
Nadeem Awad
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone?
 
Nadeem Awad
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found out that it's an old bug in Axis, and it seems that there's no workaround for it.

http://issues.apache.org/jira/browse/AXIS-2295

It seems that I need to upgrade to Axis2, or find another WS provider.

Regards,
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a workaround to this issue for this old Axis version.

You set up all your connections as you would for a Proxy connection. (including non proxy connections)
But the trick is .. you also set the nonProxyHost variable... see below.
This test is using SSL (https).

AxisProperties.setProperty("https.proxyHost", "bla1.bla1");
AxisProperties.setProperty("https.proxyPort", "8080");
AxisProperties.setProperty("https.nonProxyHosts", "bla.bla.com");

This would work.. we are using this fix.

That link in the prev post would also work .. but the issue is it's static -- and therefore, if two connections hit at the same time -- it would not work.
I believe the above would work in all cases -- or upgrade to Axis 2 (which was not an option for us).

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mark Amabile wrote:There is a workaround to this issue for this old Axis version.

You set up all your connections as you would for a Proxy connection. (including non proxy connections)
But the trick is .. you also set the nonProxyHost variable... see below.
This test is using SSL (https).

AxisProperties.setProperty("https.proxyHost", "bla1.bla1");
AxisProperties.setProperty("https.proxyPort", "8080");
AxisProperties.setProperty("https.nonProxyHosts", "bla.bla.com");

This would work.. we are using this fix.

That link in the prev post would also work .. but the issue is it's static -- and therefore, if two connections hit at the same time -- it would not work.
I believe the above would work in all cases -- or upgrade to Axis 2 (which was not an option for us).



I have the same issue> I am using two webservice.One that i need to connect to Proxy server is secured over HTTPS while the one that i need to access locally is over HTTP on a particular port

(http://bla.bla.com:PORT/...)


I want to connect to internal wothout using proxy
So if I write Awould it bypass my http webserice or should I write
 
Sankalp Dam
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to correct my above typo error : Its not but
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic