• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Axis HTTP Proxy Settings

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone?
 
Nadeem Awad
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to correct my above typo error : Its not but
 
Everyone is a villain in someone else's story. Especially this devious tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic