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)