My Java application deployed on Weblogic Cluster invokes two Webservices which are as follow.
• It sents SOAP Client request to External Application which is on internet) over HTTPS.(Java Classes created through Axis 1.4)
• Thereafter It sents SOAP Client request to internal Application(present on the other node which is connected to my LAN) over HTTP.(Java Classes created through JAX-WS:Jdeveloper Wizard)
In order to reach the 1st WS, I have to set the https proxy settings for the web service client using the following code:
System.setProperty("https.proxyHost", myProxyIP);
System.setProperty("https.proxyPort", myProxyPort);
Whereas the 2nd Web services doesn't need this proxy setting because they're already reachable on the network.
My problem is as follows:
If I call the 1st service (the one with the proxy setting), and then call the other , the Axis client tries to call these services with the same proxy setting, even if I remove the proxy setting from the System properties just before I am about to inoke the 2ns WS by writing
System.setProperty("http.proxySet", "false");
System.getProperties().remove("http.proxyHost");
System.getProperties().remove("http.proxyPort");
AxisProperties.setProperty("http.proxyHost", null);
AxisProperties.setProperty("http.proxyPort", null);
I read somwhere to use nonProxyHosts.But I am confused if should i write
System.setProperty("https.nonProxyHosts","secws.secondwsint.com");
or
System.setProperty("http.nonProxyHosts","secws.secondwsint.com");
http ot https, since the one that need to be bypassed is HTTP and the one we are setting proxy is HTTPS.
I also read in one of blog:
AxisProperties.setProperty("https.proxyHost", "bla1.bla1");
AxisProperties.setProperty("https.proxyPort", "8080");
AxisProperties.setProperty("https.nonProxyHosts", "secws.secondwsint.com");
but again confued wheather to use https.nonProxyHosts or http.nonProxyHosts
Which one would be advisable to use in my java program System.setProperty
or AxisProperties.setProperty
and importantly should i use http ot https for writing that codeline
Also, Is there any other alternative?