I saw this answer to this question last month on this list I think. 
-Dino

You can provide your own implementation of
TransportClientProperties.  Here are some snippets of what I
use for per-request proxy info for ColdFusion MX:


/* 
* Axis is directed to use this class instead of
* org.apache.axis.components.net.TransportClientProperties by
* setting the System property
*  
-Dorg.apache.axis.components.net.TransportClientProperties=coldfusion.xm
l.rpc.AxisTran \
sportClientProperties
* or by finding the following file
*
/META-INF/services/org.apache.axis.components.net.TransportClientPropert
ies
* with the full name of the replacement class (i.e. this one) in it.
* <P>
* This reads proxy settings from the MessageContext to give per-request
proxy \
support 
*/

public class AxisTransportClientProperties extends
DefaultHTTPTransportClientProperties 
{
  public String getProxyHost()
  {
    // Retrieve proxy info from Message context every time
    String ret = null;
    MessageContext context = MessageContext.getCurrentContext();
    if (context != null)
      {
        ret = (String) context.getProperty("coldfusion.proxyHost");
      }

    if (ret == null)
      {
        // use System property if set
        ret = super.getProxyHost();
      }

    return ret;
  }

}

 

-----Original Message-----
From: George Armhold [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 14, 2005 12:12 PM
To: axis-user@ws.apache.org
Subject: updating http.proxyHost property in client

Is there a way to get Axis clients to recognize that http.proxyHost (and
related properties) have changed?  They seem to be read once, and
thereafter the values are cached (see
src/org/apache/axis/components/net/DefaultHTTPTransportClientProperties.
java.)

I have a preferences tab in my client that allows the user to change the
proxy host, port, etc.  Axis will not recognize the new values until the
app has been restarted.

Thanks.

Reply via email to