Differences between revisions 7 and 8
Revision 7 as of 2005-04-06 14:17:15
Size: 1773
Comment: reset proxy settings during runtime (usually this would happen only once)
Revision 8 as of 2009-09-20 22:48:57
Size: 1779
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
Found on [http://www.mindreef.com/products/1.0/help/proxydetails.html] Found on [[http://www.mindreef.com/products/1.0/help/proxydetails.html]]
Line 15: Line 15:
As another alternative please read [http://marc.theaimsgroup.com/?l=axis-dev&m=105787295106872&w=2] As another alternative please read [[http://marc.theaimsgroup.com/?l=axis-dev&m=105787295106872&w=2]]
Line 29: Line 29:
[http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html] [[http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html]]

Sending SOAP Requests through an HTTP Proxy

To send all outbound SOAP requests from your client through wwwcache.yourdomain.net on port 3128, set the Java system properties http.proxyHost and http.proxyPort from your client code:

  System.setProperty("http.proxyHost", "wwwcache.yourdomain.net"); 
  System.setProperty("http.proxyPort", "3128"); 

You can set these system properties without modifying your client code by using the Java -D command line option when you start your Java application.

  >java -Dhttp.proxyHost=wwwcache.yourdomain.net -Dhttp.proxyPort=3128 myPackage.MyApp

Found on http://www.mindreef.com/products/1.0/help/proxydetails.html

As another alternative please read http://marc.theaimsgroup.com/?l=axis-dev&m=105787295106872&w=2 This allows you to supply a class

-Dorg.apache.axis.components.net.TransportClientProperties

that AXIS will use to provide client properties.

If you need the ability to reset proxy settings during runtime, i.e. without stopping/starting the JVM (e.g. after the proxy settings dialog of your application was edited and confirmed by a user), it is sufficient to add a public static method to TransportClientPropertiesFactory, that is just clearing its TransportClientProperties-cache. If it is possible to override the default TransportClientPropertiesFactory, by providing your custom factory

-Dorg.apache.axis.components.net.TransportClientPropertiesFactory=your.package.YourTCPropsFactory

this would be the preferable approach.

Further information about the built-in proxy options for Java2 1.4 including authentication and SOCKS can be at http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html

FrontPage/Axis/AxisProxy (last edited 2009-09-20 22:48:57 by localhost)