Redian新闻
>
请教:AXIS 1.4 webservice client using a proxy
avatar
请教:AXIS 1.4 webservice client using a proxy# Java - 爪哇娇娃
V*t
1
我最喜欢的评书
虽然最后单田芳为了凑160回这个整,略去了好多东西没讲
avatar
z*h
2
our application needs to access an external webservice, we want the
webservice client can be configurable to use a proxy server or not and which
proxy server/port to use.
Is there a good way to set/change the proxy settings dynamically?
Using the command line -D options doens't look good.
Using the System.properties is acceptable but it requires restart of JVM too
after each setting.
The weird thing is setting System.properties in our application server doesn
't seem take any affect.
Our applica
avatar
e*o
3
thanx. 很多评书都是这样,匆匆结尾,虎头蛇尾的。

【在 V*********t 的大作中提到】
: 我最喜欢的评书
: 虽然最后单田芳为了凑160回这个整,略去了好多东西没讲

avatar
g*g
4
I used System.properties and it worked, don't know about the
dynamic part.

which
too
doesn

【在 z***h 的大作中提到】
: our application needs to access an external webservice, we want the
: webservice client can be configurable to use a proxy server or not and which
: proxy server/port to use.
: Is there a good way to set/change the proxy settings dynamically?
: Using the command line -D options doens't look good.
: Using the System.properties is acceptable but it requires restart of JVM too
: after each setting.
: The weird thing is setting System.properties in our application server doesn
: 't seem take any affect.
: Our applica

avatar
e*o
5
VIc 你是用那个软件下载的。我往往是下到一半就断掉了

【在 V*********t 的大作中提到】
: 我最喜欢的评书
: 虽然最后单田芳为了凑160回这个整,略去了好多东西没讲

avatar
z*h
6
thanks.
it works if standalone, won't work in application server.

【在 g*****g 的大作中提到】
: I used System.properties and it worked, don't know about the
: dynamic part.
:
: which
: too
: doesn

avatar
V*t
7
不知道他怎么想的
干嘛非要凑那个整

【在 e**o 的大作中提到】
: thanx. 很多评书都是这样,匆匆结尾,虎头蛇尾的。
avatar
z*h
8
In case anybody is interested, here is the solution for this.
try {
Class c = TransportClientPropertiesFactory.class;
Field field = c.getDeclaredField("cache");
field.setAccessible(true);
Map map = (Map) field.get(c);
map.clear();
} catch (Exception e) {
//you should never get here unless jar file is not in the
classpath or a new version of axis jar file doesn't have these class/methods
log.error(
avatar
V*t
9
我用资源管理器上传的。。
FTP客户端软件推荐flashFXP
不过不知道这个FTP设置允不允许续传

【在 e**o 的大作中提到】
: VIc 你是用那个软件下载的。我往往是下到一半就断掉了
avatar
m*t
10
Interesting, thanks for sharing.
I would open an enhancement request with the axis team to provide a public
interface for clearing the properties. You seem to have a legitimate use
case right here.
avatar
g*g
11
Dynamic proxy is not a common practice, Java made it into system properties
maybe for performance.

【在 m******t 的大作中提到】
: Interesting, thanks for sharing.
: I would open an enhancement request with the axis team to provide a public
: interface for clearing the properties. You seem to have a legitimate use
: case right here.

avatar
z*h
12
this proxy setting is for Axis only, it won't affect any other applications
on the same JVM. System properties will affect all applications on the same
JVM and requires a restart of JVM.
sometimes you want different proxy to different URL, sometimes you want to
change the proxy, a restart of JVM is not acceptable for most of cases.
JDK 1.5 or later has a Proxy class, you can use it in URLConnection.
openConnection(Proxy) method. It's dynamically le.

properties

【在 g*****g 的大作中提到】
: Dynamic proxy is not a common practice, Java made it into system properties
: maybe for performance.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。