简体   繁体   中英

Exception in thread “main” com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 502: Proxy Error

When i make webservice call to the third party server, i am gettting following error.

Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 502: Proxy Error ( Connection refused )

I am able to get response via SOAP UI but not via code. I used wsimport to generate java code from WSDL.

Please help me to resolve this

"Connection refused" means that the client tried to connect to the server at an address and port which has nothing listening on it. Several possibilities come to mind:

  • The service which you're trying to connect to is not running.
  • The hostname in the URL is wrong, so you're connecting to the wrong host.
  • The port number in the URL is wrong, so you're connecting to the wrong port.
  • The URL says "http" when it should say "https", or vice versa.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM