SOAP:Cannot make call to the remote method.Remote host did not respond
<p>I am accessing a <code>https</code> Webservice through a jar, the service gets created and port also get instantiated but when trying to call the remote method of the Web Service ,it throws the following error.</p>

<pre><code>com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException: A remote host did not respond within the timeout period.
</code></pre>

<p>Please note that i am overriding the hostnameverifier to verify all host names as the certificate added to the keystore had a different CN from the URL of the Web Service that i am accessing through my jar.</p>

<pre><code>javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(
                            new javax.net.ssl.HostnameVerifier(){

                                public boolean verify(String hostname,
                                        javax.net.ssl.SSLSession sslSession) 
                                {
                                    mylog.setLog("Hostname Verification successfully overriden.");
                                    return true;
                                }
                            });
</code></pre>

<p>The tool that i am using is CXF .Following is the full stacktrace.</p>

<pre><code>com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException: A remote host did not respond within the timeout period.
    at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:133)
    at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:154)
    at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:95)
    at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:117)
    at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:599)
    at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:558)
    at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:543)
    at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:440)
    at com.sun.xml.internal.ws.client.Stub.process(Stub.java:223)
    at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:136)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:110)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:90)
    at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:119)
    at com.sun.proxy.$Proxy25.transferFileService(Unknown Source)
    at com.mywsclient.cxf.transfer.FileTransfer.transferToWebService(FileTransfer.java:183)
    at com.mywsclient.cxf.transfer.FileTransfer.run(FileTransfer.java:236)
    at java.lang.Thread.run(Thread.java:738)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:908)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:931)
    at java.lang.Thread.run(Thread.java:738)
Caused by: java.net.ConnectException: A remote host did not respond within the timeout period.
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:381)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:243)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:230)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:377)
    at java.net.Socket.connect(Socket.java:539)
    at java.net.Socket.connect(Socket.java:488)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:424)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:538)
    at com.ibm.net.ssl.www2.protocol.https.c.&lt;init&gt;(c.java:64)
    at com.ibm.net.ssl.www2.protocol.https.c.a(c.java:65)
    at com.ibm.net.ssl.www2.protocol.https.d.getNewHttpClient(d.java:15)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:978)
    at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:32)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1043)
    at com.ibm.net.ssl.www2.protocol.https.b.getOutputStream(b.java:79)
    at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:121)
    ... 19 more
</code></pre>