代理的 Weblogic 设置 [英] Weblogic setting for proxy
问题描述
我在Weblogic 10.3.5上连接到
我无法使用WebService
的代理配置有问题.System.setProperty()
因为它必须是每个连接方法.我必须使用的代理必须具有UserAgent
"标头.
我尝试了两种选择:
ClientProxyFeature
但它不起作用,因为它生成请求代理没有UserAgent 标头".ProxySelector
:这种方法在 JUnit 测试中效果很好,但是当我运行时它在 Weblogic 上我收到以下错误
<块引用>
错误:java.net.SocketException:未知代理类型:HTTP at...
有什么办法可以解决这个问题吗?提前致谢
亚当
我们可以使用 ProxySelector 做到这一点.我们唯一改变的是服务器启动参数:-DUseSunHttpHandler=true.现在它可以工作并发送 User-Agent 标头.
I have a problem with configuration of proxy to connect to WebService
on Weblogic 10.3.5.
I cannot use System.setProperty()
because it has to be per connection aproach.
Proxy which I have to use has to have "UserAgent
" header.
I have tried two options:
ClientProxyFeature
but it doesn't work because it generate request to proxy without "UserAgent header".ProxySelector
: this approach work great on JUnit test but when I run it on Weblogic I receive following error
error: java.net.SocketException: Unknown proxy type : HTTP at...
Is there any way to work this around? Many Thanks in advance
Adam
We are able to do this with ProxySelector. The only thing which we have changed was server start parameter: -DUseSunHttpHandler=true. Now it works and send User-Agent header.
这篇关于代理的 Weblogic 设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!