Thanks. I will try it out.
Regards,
Ravi
Ralf Bust wrote:
Hi,
Easy-Way-Solution: (probably not the best, but working)
Write a Class implementing DefaultHTTPTransportClientProperties.
Overwrite the getters() with your code.
Everytime a SOAP Call will be made is will look into your Class to get
the apropriate Proxy settings.
Load class with(VM Arguments):
-Dorg.apache.axis.components.net.TransportClientProperties=name.of.your.classWhatever
or change within your application with:
System.getProperties().setProperty("org.apache.axis.components.net.TransportClientProperties","name.of.your.classWhatever");
/*
* Axis is directed to use this class instead of
* org.apache.axis.components.net.TransportClientProperties by
* setting the System property
*
* This reads proxy settings from the MessageContext to give
per-request proxysupport
*/
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("whatever.you.want);
}
if (ret == null)
{
// use System property if set
ret = super.getProxyHost();
}
return ret;
}
}
or analye the Endpoint:
String targetService;
targetService = context.getTargetService();
if (targetService.startsWith("http://www.apache.org")){
// do what y want
}
Hope this helps.
Ralf Bust
Merten Schumann schrieb:
Per webservice .. how could you do that???
Merten
-----Original Message-----
From: Somendra Paul [mailto:[EMAIL PROTECTED] Sent: Thursday,
November 03, 2005 7:03 AM
To: axis-user@ws.apache.org
Subject: Re: proxy server information
It should ge set per jvm.But if you want to use
different proxy servers for different calls,then it
should be set per webservice.
Regards,
Somendra
--- Ravi Krishnamurthy <[EMAIL PROTECTED]> wrote:
Hello:
Can the proxy server settings like http.proxyHost be
set per webservice call or it should be set per jvm.
Thanks,
Ravi