开发者

How can I configure the HTTP proxy for a Web Service client running in JBoss 4?

开发者 https://www.devze.com 2022-12-19 09:51 出处:网络
Using NetBeans 6.8 I managed to write a JAX-WS Web Service client for a service which runs in the Internet.

Using NetBeans 6.8 I managed to write a JAX-WS Web Service client for a service which runs in the Internet.

Within NetBeans, communication through the HTTP firewall works fine.

Now I tried to run the client in a Servlet in JBoss 4.2.3.GA, here the request fails with the message:

HTTP transport error: java.net.UnknownH开发者_Go百科ostException: wwwcie.ups.com

So I guess that the VM which runs the Servlet does not know the proxy. I will try to set the proxy system properties in the Servlet code, but maybe there is also a way to enter it in a standard JBoss configuration file for example using the PropertiesService?


I missed the https in the service URL (the error message displays only the server name, not the protocol part).

The necessary change is simple, set two https (not http!) proxy properties in the PropertiesService configuration file at default/deploy/properties-service.xml

<attribute name="Properties">
  ...  

  https.proxyHost=...
  https.proxyPort=...
</attribute>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号