How can I configure the HTTP proxy for a Web Servi

2019-09-01 03:45发布

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.UnknownHostException: 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?

1条回答
劳资没心,怎么记你
2楼-- · 2019-09-01 04:32

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>
查看更多
登录 后发表回答