The recipe for overcoming this issue is as follows:


1.) Ensure that the certificate on the server uses a hostname as the Common Name (CN=).


If you’re using keytool, to create a self signed certificate the hostname exampleHost would be specified as follows:


keytool genkeypair -alias example -keyalg RSA -keysize 2048 -dname  

"CN=exampleHost, OU=Department, O=Company, L=Somewhere, S=Somestate, C=US, 

EMAILADDRESS=admin@localhost" -validity 365 -storepass  

password -keypass password


2.) Use this exact hostname in the URL.  For example...


https://exampleHost/someService


3.) Make sure the hostname properly resolves to the ip address of the server.  A quick and dirty to do this (especially with unqualified hostnames as in the example) is to place an entry in the hosts file.  Example below...


192.168.1.2    exampleHost