title: javax.xml.ws.WebServiceException: Could not send Message | java.net.ConnectException: ConnectException invoking xxx: Connection timed out: connect
body: <p>A provider exposed a webservice, i created a java client from WSDL and i configured all certificates in cacerts and keystore for security, everything works fine on my computer, the costumer asked for deploy the client in one of their windows machine, but i couldnt make it work because of the error i get when i run the code. In this machine there is active firewall, forescout, kaspersky antivirus and a network proxy so i thought some of these could block the connection and even ping the endpoint fails (on my computer instead i dont have any of these tools, just an internet connection)
  Its intresting that on the their machine <strong>i can call the services from SOAPUI</strong> and this makes me a bit confused. I wanna ask if someone has an idea of what can be the problem.. Thanks in advance.</p>
  <pre><code>2020-08-30 13:18:27 DEBUG (PhaseInterceptorChain.java:305) - Invoking handleMessage on interceptor org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor@61884cb1
  2020-08-30 13:18:27 DEBUG (PolicyVerificationOutInterceptor.java:78) - Verified policies for outbound message.
  2020-08-30 13:18:27 DEBUG (PhaseInterceptorChain.java:305) - Invoking handleMessage on interceptor org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor@423e4cbb
  2020-08-30 13:18:27 DEBUG (PhaseInterceptorChain.java:305) - Invoking handleMessage on interceptor org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor@545de5a4
  2020-08-30 13:18:27 DEBUG (PhaseInterceptorChain.java:305) - Invoking handleMessage on interceptor org.apache.cxf.interceptor.StaxOutEndingInterceptor@acb0951
  2020-08-30 13:18:27 DEBUG (PhaseInterceptorChain.java:305) - Invoking handleMessage on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@1d7f7be7
  2020-08-30 13:18:27 DEBUG (Headers.java:320) - Accept: */*
  2020-08-30 13:18:27 DEBUG (Headers.java:320) - Authorization: ***
  2020-08-30 13:18:27 DEBUG (Headers.java:320) - Connection: Keep-Alive
  2020-08-30 13:18:27 DEBUG (HTTPConduit.java:1814) - No Trust Decider for Conduit '{xxx}'. An affirmative Trust Decision is assumed.
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@1d7f7be7
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.interceptor.StaxOutEndingInterceptor@acb0951
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor@545de5a4
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor@423e4cbb
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor@61884cb1
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal@3faf2e7d
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.RPCOutInterceptor@3cfdd820
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@e25951c
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor@2e11485
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.interceptor.StaxOutInterceptor@6b0d80ed
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JStaxOutInterceptor@60dce7ea
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.interceptor.AttachmentOutInterceptor@452e19ca
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.interceptor.MessageSenderInterceptor@64ec96c6
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@928763c
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.ws.security.policy.interceptors.SecurityVerificationOutInterceptor@fd8294b
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.binding.soap.interceptor.SoapHeaderOutFilterInterceptor@6f8e8894
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor@456d6c1e
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.jaxws.interceptors.SwAOutInterceptor@77659b30
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.jaxws.interceptors.HolderOutInterceptor@1e13529a
  2020-08-30 13:18:48 DEBUG (PhaseInterceptorChain.java:496) - Invoking handleFault on interceptor org.apache.cxf.ws.policy.PolicyOutInterceptor@1b410b60
  2020-08-30 13:18:48  WARN (LogUtils.java:475) - Interceptor for {xxx} has thrown exception, unwinding now
  org.apache.cxf.interceptor.Fault: Could not send Message.
      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:67)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
      at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
      at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
      at com.sun.proxy.$Proxy35.deleteBook(Unknown Source)
      at it.main.MyMain.main(MyMain.java:65)
  Caused by: java.net.ConnectException: ConnectException invoking xxx: Connection timed out: connect
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1400)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1384)
      at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
      at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
      ... 9 more
  Caused by: java.net.ConnectException: Connection timed out: connect
      at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
      at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at sun.net.NetworkClient.doConnect(Unknown Source)
      at sun.net.www.http.HttpClient.openServer(Unknown Source)
      at sun.net.www.http.HttpClient.openServer(Unknown Source)
      at sun.net.www.protocol.https.HttpsClient.&lt;init&gt;(Unknown Source)
      at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
      at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setupWrappedStream(URLConnectionHTTPConduit.java:274)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1343)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1304)
      at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.onFirstWrite(URLConnectionHTTPConduit.java:307)
      at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:47)
      at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1356)
      ... 12 more
  2020-08-30 13:18:48 ERROR (MyMain.java:77) - javax.xml.ws.WebServiceException: Could not send Message.
  </code></pre>